-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
26 lines (1 loc) · 695 Bytes
/
app.py
File metadata and controls
26 lines (1 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
app.run(debug=True)if __name__ == '__main__': return jsonify({'error': str(e)}), 500 except Exception as e: return jsonify(results) results = scanner.scan() scanner = OWASPScanner(target_url, config) try: return jsonify({'error': 'No target URL provided'}), 400 if not target_url: target_url = request.form.get('target_url')def owasp_scan():@app.route('/owasp_scan', methods=['POST']) config = json.load(config_file)with open('config/scanner_config.json') as config_file:# Load configurationapp = Flask(__name__)import jsonfrom attacks.owasp.owasp_scanner import OWASPScannerfrom flask import Flask, request, jsonify