-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwshawk-bridge.spec
More file actions
168 lines (158 loc) · 4.81 KB
/
Copy pathwshawk-bridge.spec
File metadata and controls
168 lines (158 loc) · 4.81 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
# -*- mode: python ; coding: utf-8 -*-
# WSHawk V4.0.4 — PyInstaller spec for the GUI Bridge sidecar binary
# Bundles the full backend: core scanner, platform daemon/store/transport/session/
# protocol/attacks/evidence layers, web_pentest toolkit, payload mutator,
# database manager, and all data files.
from PyInstaller.utils.hooks import collect_data_files, collect_submodules
all_datas = collect_data_files('certifi') + collect_data_files('aiohttp') + [
# Payload wordlists (used by scanner + blaster)
('wshawk/payloads', 'wshawk/payloads'),
# Flask web dashboard templates/static (if present)
('wshawk/web', 'wshawk/web'),
]
platform_hiddenimports = []
for package in [
'wshawk.daemon',
'wshawk.store',
'wshawk.transport',
'wshawk.session',
'wshawk.protocol',
'wshawk.attacks',
'wshawk.evidence',
'wshawk.web_pentest',
'wshawk.integrations',
'wshawk.smart_payloads',
'wshawk.waf',
]:
platform_hiddenimports += collect_submodules(package)
base_hiddenimports = [
# ── Core WSHawk modules ──
'wshawk',
'wshawk.__init__',
'wshawk.__main__',
'wshawk.scanner_v2',
'wshawk.config',
'wshawk.db_manager',
'wshawk.payload_mutator',
'wshawk.ws_discovery',
'wshawk.oast_provider',
'wshawk.logger',
'wshawk.rate_limiter',
'wshawk.resilience',
'wshawk.cvss_calculator',
'wshawk.server_fingerprint',
'wshawk.message_intelligence',
'wshawk.binary_handler',
'wshawk.state_machine',
'wshawk.vulnerability_verifier',
'wshawk.wss_security_validator',
'wshawk.session_hijacking_tester',
'wshawk.enhanced_reporter',
'wshawk.report_exporter',
'wshawk.plugin_system',
'wshawk.plugin_runner',
'wshawk.defensive_validation',
'wshawk.ai_engine',
'wshawk.ai_exploit_engine',
'wshawk.dom_invader',
'wshawk.headless_xss_verifier',
'wshawk.legacy_core',
'wshawk.legacy_advanced_cli',
'wshawk.web.legacy_app',
# ── Third-party libraries PyInstaller may miss ──
'uvicorn',
'uvicorn.logging',
'uvicorn.loops',
'uvicorn.loops.auto',
'uvicorn.protocols',
'uvicorn.protocols.http',
'uvicorn.protocols.http.auto',
'uvicorn.protocols.websockets',
'uvicorn.protocols.websockets.auto',
'uvicorn.lifespan',
'uvicorn.lifespan.on',
'fastapi',
'fastapi.middleware',
'fastapi.middleware.cors',
'starlette',
'starlette.routing',
'starlette.middleware',
'starlette.middleware.cors',
'starlette.responses',
'socketio',
'engineio',
'aiohttp',
'websockets',
'dns',
'dns.resolver',
'dns.reversename',
'dns.rdatatype',
'dns.exception',
'whois',
'cryptography',
'cryptography.x509',
'cryptography.hazmat.primitives',
'cryptography.hazmat.primitives.asymmetric',
'cryptography.hazmat.primitives.asymmetric.rsa',
'cryptography.hazmat.primitives.hashes',
'cryptography.hazmat.primitives.serialization',
'cryptography.hazmat.backends',
'yaml',
'sqlite3',
# ── Playwright (optional — graceful fallback if not installed) ────────
'playwright',
'playwright.async_api',
'playwright._impl._browser',
'playwright._impl._browser_context',
'playwright._impl._page',
'playwright._impl._network',
'playwright._impl._dialog',
'playwright.sync_api',
]
hiddenimports = sorted(set(base_hiddenimports + platform_hiddenimports))
a = Analysis(
['wshawk/gui_bridge.py'],
pathex=['.'],
binaries=[],
datas=all_datas,
hiddenimports=hiddenimports,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[
# Exclude heavy dev/test deps not needed at runtime
'tkinter',
'matplotlib',
'numpy',
'pandas',
'scipy',
'pytest',
'pyinstaller',
# NOTE: playwright is no longer excluded — it's an optional runtime dep
# bundled via hiddenimports above. If not installed, dom_invader
# will gracefully degrade (HAS_PLAYWRIGHT = False).
],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='wshawk-bridge',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)