前言

小编最近使用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插件的弹出窗口"请停用以开发者模式运行的扩展程序"的更多相关文章

  1. 【已解决】Chrome提示:"请停用以开发者模式运行的扩展程序"的解决办法

    chrome用户在安装了一些第三方的chrome插件后,每次打开浏览器的时候都会出现“请停用以开发者模式运行的扩展程序”的提示,只有每次点击取消之后才能正常使用扩展.如下图所示 那么有没有什么方法可以 ...

  2. 彻底禁用Chrome的“请停用以开发者模式运行的扩展程序”提示

    前言 作为一个前端程序员,难免会有一些专属自己的小扩展,没必要每一个都发到Chrome应用商店去,虽然可以勾选"开发者模式"来运行本地插件,但是每次启动都会有一个烦人的" ...

  3. 禁用Chrome的“请停用以开发者模式运行的扩展程序”提示

    1.前言 每次启动都会有一个烦人的“请停用以开发者模式运行的扩展程序”提示,这个提示有多烦人,接触过的人都知道,启动的时候它不立即提示,等过了几秒钟等你打开某个网页开始执行某些操作时它突然弹出来干扰你 ...

  4. 最新解决Chrome(版本76.0.3809.100) “请停用以开发者模式运行的扩展程序”的方法

    最新解决Chrome(版本76.0.3809.100) “请停用以开发者模式运行的扩展程序”的方法 最近在远景论坛上发现了最新的解决Chrome浏览器提示:请停用以开发者模式运行的扩展程序的问题.该方 ...

  5. Selenium启动Chrome浏览器提示“请停用以开发者模式运行的扩展程序”的解决办法

    安装了python selenium,运行下面代码: 1 from selenium import webdriver 2 3 browser = webdriver.Chrome() 4 brows ...

  6. Chrome提示:"请停用以开发者模式运行的扩展程序"的解决办法

    操作步骤 1.开始 -> 运行 -> 输入gpedit.msc -> 回车确定打开计算机本地组策略编辑器(通过Win + R快捷键可以快速打开运行),如图所示: 2.在打开的本地组策 ...

  7. [转]关闭 Chrome 浏览器的启动时提示 - 请停用以开发者模式运行的扩展程序

    最新版本 69.0.3497.92 (x64) 解决办法: https://www.cnblogs.com/liuxianan/p/disable-chrome-extension-warning.h ...

  8. 彻底禁用chrome请停用以开发者模式运行的扩展程序弹框

    首先上图 怎么解决呢? 进入安装目录-->下图目录(一串数字的目录) 2. 找到chrome.dll 3.下载patch.exe   下载网址 https://itdocs.pipipan.co ...

  9. 去除Chrome“请停用以开发者模式运行的扩展程序”提示

    将version.dll放在chrome同级目录,重启浏览器( 79.0.3945.79版本后已失效)                    

随机推荐

  1. Web3与智能合约交互实战

    写在前面 在最初学习以太坊的时候,很多人都是自己创建以太坊节点后,使用geth与之交互.这种使用命令行交互的方法虽然让很多程序员感到兴奋(黑客帝国的既视感?),但不可能指望普通用户通过命令行使用Dap ...

  2. ubuntu18.04安装搜狗拼音

    1.下载好搜狗安装包http://pinyin.sogou.com/linux/ ,注意位数! 2.打开终端安装依赖    sudo apt install libfcitx-qt0 3.提取下载好的 ...

  3. 在Windows下同时安装Python2.x和Python3.x

    前言: Python现在是两个版本共存,Python2.x和Python3.x都同时在更新.但是Python2.x和Python3.x的区别还是很多的(以后我可能会写一篇文章列举一下Python2.x ...

  4. Spring Security-- 验证码功能的实现

    spring security4 添加验证码 http://www.itwendao.com/article/detail/165400.html http://www.itdadao.com/art ...

  5. 第三方库API接口

    第三方库API接口 InfluxDB提供了各种语言的Http API接口的封装.具体可以看这里: https://docs.influxdata.com/influxdb/v0.10/clients/ ...

  6. BZOJ_2661_[BeiJing wc2012]连连看_费用流

    BZOJ_2661_[BeiJing wc2012]连连看_费用流 Description 凡是考智商的题里面总会有这么一种消除游戏.不过现在面对的这关连连看可不是QQ游戏里那种考眼力的游戏.我们的规 ...

  7. BZOJ_1014_[JSOI2008]火星人prefix_splay+hash

    BZOJ_1014_[JSOI2008]火星人prefix_splay+hash 题意:火星人最近研究了一种操作:求一个字串两个后缀的公共前缀.比方说,有这样一个字符串:madamimadam, 我们 ...

  8. linux文件的基本属性

    Linux 文件基本属性 Linux系统是一种典型的多用户系统,不同的用户处于不同的地位,拥有不同的权限.为了保护系统的安全性,Linux系统对不同的用户访问同一文件(包括目录文件)的权限做了不同的规 ...

  9. 解决jenkins slave 中文乱码 encoding=ANSI_X3.4-1968

    jenkins配置slave进行构建时,发现slave构建的控制台输入中文乱码,查看master,slave的jenkins系统信息 file.encoding和sun.jnu.encoding都没有 ...

  10. SpringBoot集成Security,JWT,Swagger全分析

    GitHub地址: https://github.com/li-jun0201/springsecuritydemo本项目采用SpringBoot1.5.9, SpringSecurity,JWT, ...