【Chrome插件】去掉因使用jsonView插件的弹出窗口"请停用以开发者模式运行的扩展程序"
前言
小编最近使用jsonView插件时,每次打开谷歌浏览器都会弹出下面的窗口,上网搜索,找到一个非常有效的方法。

解决方法
一、新建一个文本文档
二、复制代码
<# :
@echo off
copy/b "%~f0" "%temp%\%~n0.ps1" >nul
powershell -Version 2 -ExecutionPolicy bypass -noprofile "%temp%\%~n0.ps1" "%cd% " "%~1"
del "%temp%\%~n0.ps1"
pause
exit /b
#>
param([string]$cwd='.', [string]$dll) function main {
"Chrome 'developer mode extensions' warning disabler v1.0.10.20170114`n"
$pathsDone = @{}
if ($dll -and (gi -literal $dll)) {
doPatch "DRAG'n'DROPPED" ((gi -literal $dll).directoryName + '\')
exit
}
doPatch CURRENT ((gi -literal $cwd).fullName + '\')
('HKLM', 'HKCU') | %{ $hive = $_
('', '\Wow6432Node') | %{
$key = "${hive}:\SOFTWARE$_\Google\Update\Clients"
gci -ea silentlycontinue $key -r | gp | ?{ $_.CommandLine } | %{
$path = $_.CommandLine -replace '"(.+?\\\d+\.\d+\.\d+\.\d+\\).+', '$1'
doPatch REGISTRY $path
}
}
}
}
function doPatch([string]$pathLabel, [string]$path) {
if ($pathsDone[$path.toLower()]) { return }
$dll = $path + "chrome.dll"
if (!(test-path -literal $dll)) {
return
}
"======================="
"$pathLabel PATH $((gi -literal $dll).DirectoryName)"
"`tREADING Chrome.dll..."
$bytes = [IO.File]::ReadAllBytes($dll)
# process PE headers
$BC = [BitConverter]
$coff = $BC::ToUInt32($bytes,0x3C) + 4
$is64 = $BC::ToUInt16($bytes,$coff) -eq 0x8664
$opthdr = $coff+20
$codesize = $BC::ToUInt32($bytes,$opthdr+4)
$imagebase32 = $BC::ToUInt32($bytes,$opthdr+28)
# patch the flag in data section
$data = $BC::ToString($bytes,$codesize)
$flag = "ExtensionDeveloperModeWarning"
$stroffs = $data.IndexOf($BC::ToString($flag[1..99]))/3 - 1
if ($stroffs -lt 0) {
write-host -f red "`t$flag not found"
return
}
$stroffs += $codesize
if ($bytes[$stroffs] -eq 0) {
write-host -f darkgreen "`tALREADY PATCHED"
return
}
$exe = join-path (split-path $path) chrome.exe
$EA = $ErrorActionPreference
$ErrorActionPreference = 'silentlyContinue'
while ((get-process chrome -module | ?{ $_.FileName -eq $exe })) {
forEach ($timeout in 15..0) {
write-host -n -b yellow -f black `
"`rChrome is running and will be terminated in $timeout sec. "
write-host -n -b yellow -f darkyellow "Press ENTER to do it now. "
if ([console]::KeyAvailable) {
$key = $Host.UI.RawUI.ReadKey("AllowCtrlC,IncludeKeyDown,NoEcho")
if ($key.virtualKeyCode -eq 13) { break }
if ($key.virtualKeyCode -eq 27) { write-host; exit }
}
sleep 1
}
write-host
get-process chrome | ?{
$_.MainWindowHandle.toInt64() -and ($_ | gps -file).FileName -eq $exe
} | %{
"`tTrying to exit gracefully..."
if ($_.CloseMainWindow()) {
sleep 1
}
}
$killLabelShown = 0
get-process chrome | ?{
($_ | gps -file | select -expand FileName) -eq $exe
} | %{
if (!$killLabelShown++) {
"`tTerminating background chrome processes..."
}
stop-process $_ -force
}
sleep -milliseconds 200
}
$ErrorActionPreference = $EA
$bytes[$stroffs] = 0
"`tPATCHED $flag flag"
# patch the channel restriction code for stable/beta
$code = $BC::ToString($bytes,0,$codesize)
$rxChannel = '83-F8-(?:03-7D|02-7F)'
# old code: cmp eax,3; jge ...
# new code: cmp eax,2; jg ...
$chanpos = 0
try {
if ($is64) {
$pos = 0
$rx = [regex]"$rxChannel-.{1,100}-48-8D"
do {
$m = $rx.match($code,$pos)
if (!$m.success) { break }
$chanpos = $m.index/3 + 2
$pos = $m.index + $m.length + 1
$offs = $BC::ToUInt32($bytes,$pos/3+1)
$diff = $pos/3+5+$offs - $stroffs
} until ($diff -ge 0 -and $diff -le 4096 -and $diff % 256 -eq 0)
if (!$m.success) {
$rx = [regex]"84-C0.{18,48}($rxChannel)-.{30,60}84-C0"
$m = $rx.matches($code)
if ($m.count -ne 1) { throw }
$chanpos = $m[0].groups[1].index/3 + 2
}
} else {
$flagOffs = [uint32]$stroffs + [uint32]$imagebase32
$flagOffsStr = $BC::ToString($BC::GetBytes($flagOffs))
$variants = "(?<channel>$rxChannel-.{1,100})-68-(?<flag>`$1-.{6}`$2)",
"68-(?<flag>`$1-.{6}`$2).{300,500}E8.{12,32}(?<channel>$rxChannel)",
"E8.{12,32}(?<channel>$rxChannel).{300,500}68-(?<flag>`$1-.{6}`$2)"
forEach ($variant in $variants) {
$pattern = $flagOffsStr -replace '^(..)-.{6}(..)', $variant
"`tLooking for $($pattern -replace '\?<.+?>', '')..."
$minDiff = 65536
foreach ($m in [regex]::matches($code, $pattern)) {
$maybeFlagOffs = $BC::toUInt32($bytes, $m.groups['flag'].index/3)
$diff = [Math]::abs($maybeFlagOffs - $flagOffs)
if ($diff % 256 -eq 0 -and $diff -lt $minDiff) {
$minDiff = $diff
$chanpos = $m.groups['channel'].index/3 + 2
}
}
}
if (!$chanpos) { throw }
}
} catch {
write-host -f red "`tUnable to find the channel code, try updating me"
write-host -f red "`thttp://stackoverflow.com/a/30361260"
return
}
$bytes[$chanpos] = 9
"`tPATCHED Chrome release channel restriction" "`tWriting to a temporary dll..."
[IO.File]::WriteAllBytes("$dll.new",$bytes) "`tBacking up the original dll..."
move -literal $dll "$dll.bak" -force "`tRenaming the temporary dll as the original dll..."
move -literal "$dll.new" $dll -force $pathsDone[$path.toLower()] = $true
write-host -f green "`tDONE.`n"
[GC]::Collect()
} main
三、命名脚本文件chrome.bat
四、出现问题

1.将Chrome.bat文件放到路径下:C:\Windows\System32\WindowsPowerShell\v1.0
2.双击运行即可。
【Chrome插件】去掉因使用jsonView插件的弹出窗口"请停用以开发者模式运行的扩展程序"的更多相关文章
- 【已解决】Chrome提示:"请停用以开发者模式运行的扩展程序"的解决办法
chrome用户在安装了一些第三方的chrome插件后,每次打开浏览器的时候都会出现“请停用以开发者模式运行的扩展程序”的提示,只有每次点击取消之后才能正常使用扩展.如下图所示 那么有没有什么方法可以 ...
- 彻底禁用Chrome的“请停用以开发者模式运行的扩展程序”提示
前言 作为一个前端程序员,难免会有一些专属自己的小扩展,没必要每一个都发到Chrome应用商店去,虽然可以勾选"开发者模式"来运行本地插件,但是每次启动都会有一个烦人的" ...
- 禁用Chrome的“请停用以开发者模式运行的扩展程序”提示
1.前言 每次启动都会有一个烦人的“请停用以开发者模式运行的扩展程序”提示,这个提示有多烦人,接触过的人都知道,启动的时候它不立即提示,等过了几秒钟等你打开某个网页开始执行某些操作时它突然弹出来干扰你 ...
- 最新解决Chrome(版本76.0.3809.100) “请停用以开发者模式运行的扩展程序”的方法
最新解决Chrome(版本76.0.3809.100) “请停用以开发者模式运行的扩展程序”的方法 最近在远景论坛上发现了最新的解决Chrome浏览器提示:请停用以开发者模式运行的扩展程序的问题.该方 ...
- Selenium启动Chrome浏览器提示“请停用以开发者模式运行的扩展程序”的解决办法
安装了python selenium,运行下面代码: 1 from selenium import webdriver 2 3 browser = webdriver.Chrome() 4 brows ...
- Chrome提示:"请停用以开发者模式运行的扩展程序"的解决办法
操作步骤 1.开始 -> 运行 -> 输入gpedit.msc -> 回车确定打开计算机本地组策略编辑器(通过Win + R快捷键可以快速打开运行),如图所示: 2.在打开的本地组策 ...
- [转]关闭 Chrome 浏览器的启动时提示 - 请停用以开发者模式运行的扩展程序
最新版本 69.0.3497.92 (x64) 解决办法: https://www.cnblogs.com/liuxianan/p/disable-chrome-extension-warning.h ...
- 彻底禁用chrome请停用以开发者模式运行的扩展程序弹框
首先上图 怎么解决呢? 进入安装目录-->下图目录(一串数字的目录) 2. 找到chrome.dll 3.下载patch.exe 下载网址 https://itdocs.pipipan.co ...
- 去除Chrome“请停用以开发者模式运行的扩展程序”提示
将version.dll放在chrome同级目录,重启浏览器( 79.0.3945.79版本后已失效)
随机推荐
- Spring Aop技术原理分析
本篇文章从Aop xml元素的解析开始,分析了Aop在Spring中所使用到的技术.包括Aop各元素在容器中的表示方式.Aop自动代理的技术.代理对象的生成及Aop拦截链的调用等等.将这些技术串联起来 ...
- MySql的下载和安装(解压版)
工具/原料 windows系统 一.Mysql的下载 打开浏览器,输入mysql,点击百度搜索,得到搜索结果. 在搜索结果中,选择下面结果,因为浏览器的不同,Mysql官网在搜索结果的 ...
- 使用EHCache需要注意的几个问题(转)
最近做一个小项目,需要对一批数据进行缓存,且要求持久化到磁盘.使用ehcache非常简单和直观,一般来说只需要配置ehcache.xml文件,接着直接使用@Cacheable, @Cacheput, ...
- 使用SimHash进行海量文本去重[转载]
阅读目录 1. SimHash与传统hash函数的区别 2. SimHash算法思想 3. SimHash流程实现 4. SimHash签名距离计算 5. SimHash存储和索引 6. SimHas ...
- php-msf 源码解读【转】
php-msf: https://github.com/pinguo/php-msf 百度脑图 - php-msf 源码解读: http://naotu.baidu.com/file/cc7b5a49 ...
- Python Web(Django)与SQL SERVER的连接处理
(开开心心每一天~ ---虫瘾师) Python Web(Django) 与SQL SERVRE的连接----Come QQ群:607021567(里面有很多开源代码和资料,并且python的游戏也有 ...
- Linux下解压后缀名为".tar.xz"的文件
作者:荒原之梦 原文链接:http://zhaokaifeng.com/?p=576 1 解压".xz" xz -d your_file_name.tar.xz 注:运行上述命令后 ...
- Mybatis通过注解方式实现批量插入数据库 及 常见的坑
原文地址:http://f0rb.iteye.com/blog/1207384 MyBatis中通过xml文件配置数据库批量操作的文章很多,比如这篇http://www.cnblogs.com/xcc ...
- 运维监控利器Nagios之:nagios配置详解
http://ixdba.blog.51cto.com/2895551/752870 一.nagios配置过程详解 1.nagios默认配置文件介绍 nagios安装完毕后,默认的配置文件在/usr ...
- nrpe参数传递
如果需要nrpe进行参数传递需要主要一下几个方面: 1.编译nrpe的时候需要增加参数--enable-command-args 2.修改nrpe.cfg文件中参数dont_blame_nrpe=1 ...