MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / browser_update_tools

Function browser_update_tools

Scripts/Developer Base/Free Internet.py:1531–1546  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1529
1530@app.route("/browser/update_tools")
1531def browser_update_tools():
1532 msgs = []
1533 if is_termux() and which("pkg"):
1534 _run(["pkg", "update", "-y"])
1535 _run(["pkg", "install", "-y", "openssl", "tor"])
1536 msgs.append("Termux packages checked")
1537 if _run([sys.executable, "-m", "pip", "install", "--upgrade", "requests", "pysocks"]):
1538 msgs.append("Python packages updated")
1539 prefs = browser_prefs()
1540 count = len(fetch_proxy_pool(prefs.get("country", "US"), force_refresh=True))
1541 msgs.append(f"{count} proxies ready")
1542 if prefs.get("tor_enabled"):
1543 ok, msg = start_tor()
1544 msgs.append(msg)
1545 flash(" · ".join(msgs) or "Browser tools checked.")
1546 return redirect(request.referrer or url_for("browser_settings"))
1547
1548
1549

Callers

nothing calls this directly

Calls 6

is_termuxFunction · 0.70
whichFunction · 0.70
_runFunction · 0.70
browser_prefsFunction · 0.70
fetch_proxy_poolFunction · 0.70
start_torFunction · 0.70

Tested by

no test coverage detected