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

Function zap_import_openapi

webapp_modern.py:18160–18184  ·  view source on GitHub ↗

Import OpenAPI/Swagger specification for API scanning

()

Source from the content-addressed store, hash-verified

18158
18159@app.route('/api/wardriving/interfaces')
18160def wardriving_interfaces():
18161 """List available WiFi interfaces for wardriving."""
18162 try:
18163 engine = _get_wardriving_engine()
18164 interfaces = engine._detect_wifi_interfaces()
18165 result = []
18166 for iface in interfaces:
18167 info = {'name': iface, 'type': 'wifi'}
18168 # Try to get driver/chipset info
18169 try:
18170 driver_path = f'/sys/class/net/{iface}/device/driver'
18171 if os.path.islink(driver_path):
18172 info['driver'] = os.path.basename(os.readlink(driver_path))
18173 phy_path = f'/sys/class/net/{iface}/phy80211/name'
18174 if os.path.exists(phy_path):
18175 with open(phy_path) as f:
18176 info['phy'] = f.read().strip()
18177 except Exception:
18178 pass
18179 result.append(info)
18180 return jsonify({'interfaces': result})
18181 except Exception as e:
18182 return jsonify({'error': str(e)}), 500
18183
18184
18185@app.route('/api/wardriving/bluetooth')
18186def wardriving_bluetooth():
18187 """Get discovered Bluetooth devices."""

Callers

nothing calls this directly

Calls 4

zap_import_openapiMethod · 0.80
errorMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected