proxy qualifier: IG+Google gate, transparent-leak detection, qualify loop service
This commit is contained in:
11
app.py
11
app.py
@@ -982,10 +982,13 @@ def api_text(mac):
|
||||
serial = _serial_for(mac)
|
||||
if not serial:
|
||||
return jsonify({"error": "offline"}), 404
|
||||
txt = (data.get("text") or "").replace(" ", "%s").replace("'", "\\'")
|
||||
r = subprocess.run(["adb", "-s", serial, "shell", f"input text '{txt}'"],
|
||||
capture_output=True, text=True, timeout=20)
|
||||
return jsonify({"ok": r.returncode == 0, "err": r.stderr[:100]})
|
||||
txt = (data.get("text") or "").replace(" ", "%s")
|
||||
try:
|
||||
r = subprocess.run(["adb", "-s", serial, "shell", "input", "text", txt],
|
||||
capture_output=True, text=True, timeout=30)
|
||||
return jsonify({"ok": r.returncode == 0, "err": r.stderr[:100]})
|
||||
except Exception as e:
|
||||
return jsonify({"ok": False, "err": f"text err: {type(e).__name__}"}), 500
|
||||
|
||||
@app.route("/api/device/<mac>/launch", methods=["POST"])
|
||||
def api_launch(mac):
|
||||
|
||||
Reference in New Issue
Block a user