Просмотр полной версии : замена js файла а https странице
Только на локальной машине, для личного пользования.
сайт на https, нужно на лету менять один js файл, попробовал proxomitron, ругается на сертификаты.
Плагины chrome для подмены js файла пишут block mixed content
ckpunmkug
09.02.2020, 18:06
Попробуйте зайти со стороны "Chrome DevTools Protocol" (https://chromedevtools.github.io/devtools-protocol/)
Для знакомства что это такое (https://developers.google.com/web/updates/2017/04/headless-chrome)
Запустить в отладке
Code:
/usr/bin/chromium --remote-debugging-port=9222
chrome.exe --remote-debugging-port=9222
Вариант 1.
Тормознуть скрипт.
Code:
Runtime.terminateExecution
Terminate current or next JavaScript execution. Will cancel the termination when the outer-most script execution ends.
Запустить свой
Code:
Runtime.runScript
Runs script with given id in a given context.
Вариант 2.
Подменить скрипту урл.
Code:
Fetch.continueRequest
Continues the request, optionally modifying some of its parameters.
Описан способ модификации ответа (https://blog.shapesecurity.com/2018/09/17/intercepting-and-modifying-responses-with-chrome-via-the-devtools-protocol/)
ckpunmkug said:
↑ (https://antichat.live/posts/4363256/)
Попробуйте зайти со стороны
"Chrome DevTools Protocol" (https://chromedevtools.github.io/devtools-protocol/)
Для знакомства что это такое (https://developers.google.com/web/updates/2017/04/headless-chrome)
Запустить в отладке
Code:
/usr/bin/chromium --remote-debugging-port=9222
chrome.exe --remote-debugging-port=9222
Вариант 1.
Тормознуть скрипт.
Code:
Runtime.terminateExecution
Terminate current or next JavaScript execution. Will cancel the termination when the outer-most script execution ends.
Запустить свой
Code:
Runtime.runScript
Runs script with given id in a given context.
Вариант 2.
Подменить скрипту урл.
Code:
Fetch.continueRequest
Continues the request, optionally modifying some of its parameters.
Описан способ модификации ответа (https://blog.shapesecurity.com/2018/09/17/intercepting-and-modifying-responses-with-chrome-via-the-devtools-protocol/)
ниче се, если бы не https - все просто сделал бы, тут мозгов не хватит )
ckpunmkug
13.02.2020, 22:46
Это только кажется, возьмите puppeter (https://developers.google.com/web/tools/puppeteer)
vBulletin® v3.8.14, Copyright ©2000-2026, vBulletin Solutions, Inc. Перевод: zCarot