замена js файла а https странице

Discussion in 'Песочница' started by topmet, 8 Feb 2020.

  1. topmet

    topmet New Member

    Joined:
    28 Apr 2010
    Messages:
    2
    Likes Received:
    0
    Reputations:
    0
    Только на локальной машине, для личного пользования.

    сайт на https, нужно на лету менять один js файл, попробовал proxomitron, ругается на сертификаты.
    Плагины chrome для подмены js файла пишут block mixed content
     
  2. ckpunmkug

    ckpunmkug Member

    Joined:
    20 Mar 2017
    Messages:
    69
    Likes Received:
    67
    Reputations:
    10
    Попробуйте зайти со стороны "Chrome DevTools Protocol"
    Для знакомства что это такое

    Запустить в отладке
    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.
    
    Описан способ модификации ответа
     
    #2 ckpunmkug, 9 Feb 2020
    Last edited: 9 Feb 2020
  3. topmet

    topmet New Member

    Joined:
    28 Apr 2010
    Messages:
    2
    Likes Received:
    0
    Reputations:
    0
    ниче се, если бы не https - все просто сделал бы, тут мозгов не хватит )
     
  4. ckpunmkug

    ckpunmkug Member

    Joined:
    20 Mar 2017
    Messages:
    69
    Likes Received:
    67
    Reputations:
    10
    Это только кажется, возьмите puppeter
     
Loading...
Similar Threads - замена файла https
  1. Loents
    Replies:
    14
    Views:
    2,655