-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathphantom_runner.py
More file actions
228 lines (187 loc) · 10.5 KB
/
Copy pathphantom_runner.py
File metadata and controls
228 lines (187 loc) · 10.5 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
╔══════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ║
║ █▓▒░ P H A N T O M N E T R U N N E R ░▒▓█ ◢◤ NIGHT CITY EDITION ◢◤ ║
║ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ║
╠══════════════════════════════════════════════════════════════════════════════════════════════════════════╣
║ ║
║ ██████╗ ██╗ ██╗ █████╗ ███╗ ██╗████████╗ ██████╗ ███╗ ███╗ ║
║ ██╔══██╗██║ ██║██╔══██╗████╗ ██║╚══██╔══╝██╔═══██╗████╗ ████║ NETRUNNER v3.0 ║
║ ██████╔╝███████║███████║██╔██╗ ██║ ██║ ██║ ██║██╔████╔██║ Night City // 2077 ║
║ ██╔═══╝ ██╔══██║██╔══██║██║╚██╗██║ ██║ ██║ ██║██║╚██╔╝██║ ║
║ ██║ ██║ ██║██║ ██║██║ ╚████║ ██║ ╚██████╔╝██║ ╚═╝ ██║ "In the Net, no one ║
║ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ hears you breach the ICE." ║
║ ║
╠══════════════════════════════════════════════════════════════════════════════════════════════════════════╣
║ ◢ QUICKHACKS ◤ ◢ DAEMONS ◤ ◢ ICE BREACHING ◤ ║
║ [■] Breach Protocol [■] ICEPICK [■] Neural Scanner ║
║ [■] Short Circuit [■] MASS VULNERABILITY [■] Subnet Mapper ║
║ [■] Cyberpsychosis [■] DATAMINE [■] Ghost Protocol ║
║ ║
║ ⚠ NETWATCH ADVISORY: UNAUTHORIZED ACCESS IS A CORPO DEATH SENTENCE ⚠ ║
║ 🌐 https://github.com/MiChaelinzo/CyberPunkNetrunner ║
║ ║
╚══════════════════════════════════════════════════════════════════════════════════════════════════════════╝
PHANTOM NETRUNNER - Cyberpunk 2077 Inspired Cybersecurity Framework
This is the main jack-in point for the PHANTOM Netrunner cyberdeck.
Run this script to jack into the Net and access quickhacks.
Usage:
python phantom_runner.py [options]
Options:
-h, --help Show this help message
-v, --version Show cyberdeck firmware version
-q, --quiet Quiet mode (stealth output)
--no-banner Skip the boot sequence animation
--config PATH Path to cyberdeck configuration file
Cyberpunk 2077 Terms:
- ICE: Intrusion Countermeasures Electronics (security programs)
- Quickhack: Rapid cyber attack uploaded to target
- Daemon: Persistent background program
- Netrunner: Professional hacker with neural interface
- Jack In/Out: Connect/disconnect from the Net
Copyright (c) 2024 CyberPunk Netrunner Project
Licensed under MIT License - For authorized security testing only
"Wake the f*** up, Samurai. We have a city to burn." - Johnny Silverhand
"""
import sys
import os
import argparse
from pathlib import Path
# Add phantom package to path
sys.path.insert(0, str(Path(__file__).parent))
__version__ = "3.0.0"
__codename__ = "PHANTOM"
__cyberdeck__ = "Netwatch Netdriver Mk.5"
def parse_arguments():
"""Parse command line arguments for the Cyberdeck"""
parser = argparse.ArgumentParser(
description="PHANTOM Netrunner - Night City Cybersecurity Framework",
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog="""
Examples:
%(prog)s Jack into the Net (interactive mode)
%(prog)s --no-banner Skip boot animation
%(prog)s -v Show cyberdeck firmware version
Cyberpunk 2077 Inspired - For authorized security testing only.
"In the Net, no one hears you breach the ICE."
For more information, visit: https://github.com/MiChaelinzo/CyberPunkNetrunner
"""
)
parser.add_argument(
'-v', '--version',
action='version',
version=f'PHANTOM Netrunner v{__version__} ({__codename__}) // Cyberdeck: {__cyberdeck__}'
)
parser.add_argument(
'-q', '--quiet',
action='store_true',
help='Ghost mode - stealth output'
)
parser.add_argument(
'--no-banner',
action='store_true',
help='Skip the cyberdeck boot animation'
)
parser.add_argument(
'--config',
type=str,
default=None,
help='Path to cyberdeck configuration file'
)
parser.add_argument(
'--module',
type=str,
default=None,
help='Execute specific quickhack directly'
)
parser.add_argument(
'--legacy',
action='store_true',
help='Launch the classic Netrunner.py interface with all original tools'
)
return parser.parse_args()
def check_python_version():
"""Check Python version compatibility"""
if sys.version_info < (3, 7):
print("\033[38;5;196m[✗ ICE] PHANTOM requires Python 3.7 or higher\033[0m")
print(f"\033[38;5;244m[◢◤] Current version: {sys.version}\033[0m")
sys.exit(1)
def check_dependencies():
"""Check for required cyberdeck components"""
required = ['requests']
optional = ['rich', 'flask']
missing_required = []
missing_optional = []
for pkg in required:
try:
__import__(pkg)
except ImportError:
missing_required.append(pkg)
for pkg in optional:
try:
__import__(pkg)
except ImportError:
missing_optional.append(pkg)
if missing_required:
print("\033[38;5;196m[✗ ICE] Missing required cyberdeck components:\033[0m")
for pkg in missing_required:
print(f"\033[38;5;244m - {pkg}\033[0m")
print(f"\n\033[38;5;51m[◢◤] Install with: pip install " + " ".join(missing_required) + "\033[0m")
sys.exit(1)
if missing_optional:
print("\033[38;5;226m[⚠ ALERT] Optional components not installed (some quickhacks limited):\033[0m")
for pkg in missing_optional:
print(f"\033[38;5;244m - {pkg}\033[0m")
print()
def main():
"""Main entry point - Jack into the Net"""
# Parse arguments
args = parse_arguments()
# Check Python version
check_python_version()
# Check dependencies
if not args.quiet:
check_dependencies()
# Legacy mode - launch classic Netrunner.py interface
if args.legacy:
try:
import importlib.util
netrunner_path = str(Path(__file__).parent / "Netrunner.py")
spec = importlib.util.spec_from_file_location("Netrunner", netrunner_path)
netrunner_mod = importlib.util.module_from_spec(spec)
spec.loader.exec_module(netrunner_mod)
netrunner_mod.menu()
except KeyboardInterrupt:
print("\n\n\033[38;5;226m[⚠ ALERT] Emergency jack-out initiated by user\033[0m")
sys.exit(0)
except Exception as e:
print(f"\n\033[38;5;196m[✗ ICE] Legacy Netrunner error: {e}\033[0m")
if '--debug' in sys.argv:
import traceback
traceback.print_exc()
sys.exit(1)
return
# Import and run the Cyberdeck engine
try:
from phantom.core.engine import PhantomEngine
engine = PhantomEngine(config_path=args.config)
if args.module:
# Execute specific quickhack
engine.display_banner()
engine.run_module(args.module)
else:
# Interactive netrunning mode
engine.run()
except KeyboardInterrupt:
print("\n\n\033[38;5;226m[⚠ ALERT] Emergency jack-out initiated by user\033[0m")
sys.exit(0)
except Exception as e:
print(f"\n\033[38;5;196m[✗ ICE] Critical system failure: {e}\033[0m")
if '--debug' in sys.argv:
import traceback
traceback.print_exc()
sys.exit(1)
if __name__ == "__main__":
main()