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

Function get_enriched_findings

webapp_modern.py:13488–13514  ·  view source on GitHub ↗

Get all enriched findings with threat intelligence

()

Source from the content-addressed store, hash-verified

13486
13487 if not os.path.isdir(os.path.join(repo_path, '.git')):
13488 return jsonify({
13489 'success': False,
13490 'error': 'Pwnagotchi is not installed at /opt/pwnagotchi'
13491 }), 400
13492
13493 logger.info(f"Pwn manual update requested at {repo_path}")
13494 update_result = _execute_pwn_git_update(repo_path)
13495
13496 if not update_result['success']:
13497 return jsonify({
13498 'success': False,
13499 'error': update_result['error'] or 'Unknown error during git pull',
13500 'warnings': update_result['warnings'],
13501 'suggestion': 'Check repository status; SSH in if persistent.'
13502 }), 500
13503
13504 return jsonify({
13505 'success': True,
13506 'message': 'Pwnagotchi update completed successfully',
13507 'output': update_result['output'],
13508 'warnings': update_result['warnings']
13509 })
13510
13511@app.route('/api/pwn/stash-update', methods=['POST'])
13512def pwn_stash_and_update():
13513 """Stash, pull, drop stash (or preserve on failure). Mirrors stash_and_update
13514 but operates on /opt/pwnagotchi via sudo."""
13515 repo_path = PWN_REPO_PATH
13516
13517 if not os.path.isdir(os.path.join(repo_path, '.git')):

Callers

nothing calls this directly

Calls 6

errorMethod · 0.80
getMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected