Import OpenAPI/Swagger specification for API scanning
()
| 18158 | |
| 18159 | @app.route('/api/wardriving/interfaces') |
| 18160 | def 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') |
| 18186 | def wardriving_bluetooth(): |
| 18187 | """Get discovered Bluetooth devices.""" |
nothing calls this directly
no test coverage detected