MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _split_port_field

Function _split_port_field

webapp_modern.py:3608–3623  ·  view source on GitHub ↗
(port_field: Optional[str])

Source from the content-addressed store, hash-verified

3606
3607 if action == 'pwn_swap':
3608 # Toggle the Pwnagotchi<->Ragnar port bridge (only if pwnagotchi installed).
3609 if not shared_data.config.get('pwnagotchi_installed', False):
3610 return 'disabled', 409
3611 try:
3612 import requests as _rq
3613 _rq.post('http://127.0.0.1:8000/api/pwnagotchi/swap', timeout=8)
3614 return 'started', 202
3615 except Exception as exc:
3616 logger.warning(f"[cyd] pwn_swap failed: {exc}")
3617 return 'error', 500
3618
3619 return 'unknown', 400
3620
3621
3622@app.route('/api/cyd/wf', methods=['GET'])
3623def cyd_wf():
3624 """Waterfall row for the CYD&#x27;s Waterfall screen (WiFi transport; the serial
3625 transport streams these over the cable). `band` selects the sweep, `on=0`
3626 releases the SDR. Returns a data row, {'waiting':1}, or {'err':'no SDR'}."""

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected