留点坑之后再填
This commit is contained in:
parent
a595bcf731
commit
9fe1384b5d
10
.gitignore
vendored
10
.gitignore
vendored
@ -1,2 +1,10 @@
|
|||||||
evn/*
|
evn/*
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
venv
|
||||||
|
debug
|
||||||
|
error
|
||||||
|
__pycache__
|
||||||
|
*.py[cod]
|
||||||
|
*.xml
|
@ -4,7 +4,10 @@ mitm:
|
|||||||
port: 8080
|
port: 8080
|
||||||
|
|
||||||
webdriver:
|
webdriver:
|
||||||
bin: 'msedgedriver.exe'
|
headless: False
|
||||||
|
use: edge
|
||||||
|
edge:
|
||||||
|
bin: msedgedriver.exe
|
||||||
|
|
||||||
rooms:
|
rooms:
|
||||||
- 19829678666
|
- 19829678666
|
||||||
|
16
main.py
16
main.py
@ -1,25 +1,19 @@
|
|||||||
import sys
|
|
||||||
import threading
|
import threading
|
||||||
import subprocess
|
import subprocess
|
||||||
from urllib.parse import urlparse
|
|
||||||
|
|
||||||
from config.helper import config
|
from config.helper import config
|
||||||
from handler.http_server import app
|
from handler.http_server import app
|
||||||
from handler.utils import loop_queue
|
from handler.utils import loop_queue
|
||||||
from scripts import webdriver
|
from browser.manager import BrowserManager
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
if len(sys.argv) == 1 or not urlparse(sys.argv[1]).scheme:
|
|
||||||
print('Invalid url provided, please check...')
|
|
||||||
sys.exit(1)
|
|
||||||
api_thread = threading.Thread(target=app.run, args=(config()["http"]["host"], config()["http"]["port"],))
|
|
||||||
api_thread.start()
|
|
||||||
mitmproxy_process = subprocess.Popen([
|
mitmproxy_process = subprocess.Popen([
|
||||||
config()["mitm"]["bin"], "-s", "./scripts/mitmproxy.py", "-q",
|
config()["mitm"]["bin"], "-s", "./proxy_script.py", "-q",
|
||||||
"--listen-host", config()["mitm"]["host"], "--listen-port", str(config()["mitm"]["port"])
|
"--listen-host", config()["mitm"]["host"], "--listen-port", str(config()["mitm"]["port"])
|
||||||
])
|
])
|
||||||
t = threading.Thread(target=webdriver.go, args=(sys.argv[1],))
|
api_thread = threading.Thread(target=app.run, args=(config()["http"]["host"], config()["http"]["port"],))
|
||||||
t.start()
|
api_thread.start()
|
||||||
|
manager = BrowserManager()
|
||||||
queue_thread = threading.Thread(target=loop_queue)
|
queue_thread = threading.Thread(target=loop_queue)
|
||||||
queue_thread.start()
|
queue_thread.start()
|
||||||
queue_thread.join()
|
queue_thread.join()
|
||||||
|
Reference in New Issue
Block a user