-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwafpierce.spec
More file actions
176 lines (167 loc) · 4.99 KB
/
wafpierce.spec
File metadata and controls
176 lines (167 loc) · 4.99 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
# -*- mode: python ; coding: utf-8 -*-
"""
PyInstaller spec file for WAFPierce GUI application.
This bundles the entire application with all dependencies into a single executable.
"""
import os
import sys
block_cipher = None
# Get the project root directory
project_root = os.path.dirname(os.path.abspath(SPEC))
# Data files to include (wordlists, logo, etc.)
datas = [
# Include wordlists folder
(os.path.join(project_root, 'wordlists'), 'wordlists'),
# Include logo
(os.path.join(project_root, 'wafpierce', 'logo_Temp'), os.path.join('wafpierce', 'logo_Temp')),
# Include categories file
(os.path.join(project_root, 'categories.txt'), '.'),
]
# Try to find and include PySide6 plugins for proper styling
try:
import PySide6
pyside6_dir = os.path.dirname(PySide6.__file__)
plugins_dir = os.path.join(pyside6_dir, 'plugins')
if os.path.exists(plugins_dir):
# Include platform plugins (essential for Qt to work)
platforms_dir = os.path.join(plugins_dir, 'platforms')
if os.path.exists(platforms_dir):
datas.append((platforms_dir, os.path.join('PySide6', 'plugins', 'platforms')))
# Include style plugins (for proper app appearance)
styles_dir = os.path.join(plugins_dir, 'styles')
if os.path.exists(styles_dir):
datas.append((styles_dir, os.path.join('PySide6', 'plugins', 'styles')))
# Include imageformats for icons
imageformats_dir = os.path.join(plugins_dir, 'imageformats')
if os.path.exists(imageformats_dir):
datas.append((imageformats_dir, os.path.join('PySide6', 'plugins', 'imageformats')))
except ImportError:
pass
# Hidden imports that PyInstaller might miss
hidden_imports = [
# PySide6 core modules - only include what we actually use
'PySide6',
'PySide6.QtCore',
'PySide6.QtGui',
'PySide6.QtWidgets',
'shiboken6',
# Requests and networking
'requests',
'requests.adapters',
'urllib3',
'urllib3.util',
'urllib3.util.retry',
'urllib3.exceptions',
'certifi',
'charset_normalizer',
'charset_normalizer.md',
'charset_normalizer.md__mypyc',
'idna',
# WAFPierce modules
'wafpierce',
'wafpierce.gui',
'wafpierce.pierce',
'wafpierce.chain',
'wafpierce.error_handler',
'wafpierce.exceptions',
# Standard library modules
'json',
'threading',
'subprocess',
'tempfile',
'concurrent.futures',
'multiprocessing',
'logging',
'socket',
'ssl',
're',
'hashlib',
'functools',
'typing',
'io',
'webbrowser',
]
a = Analysis(
[os.path.join(project_root, 'run_gui.py')],
pathex=[project_root],
binaries=[],
datas=datas,
hiddenimports=hidden_imports,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[
# Exclude unnecessary PySide6 modules to reduce size and build time
'PySide6.Qt3DAnimation',
'PySide6.Qt3DCore',
'PySide6.Qt3DExtras',
'PySide6.Qt3DInput',
'PySide6.Qt3DLogic',
'PySide6.Qt3DRender',
'PySide6.QtBluetooth',
'PySide6.QtCharts',
'PySide6.QtConcurrent',
'PySide6.QtDataVisualization',
'PySide6.QtDesigner',
'PySide6.QtHelp',
'PySide6.QtMultimedia',
'PySide6.QtMultimediaWidgets',
'PySide6.QtNetworkAuth',
'PySide6.QtNfc',
'PySide6.QtOpenGL',
'PySide6.QtOpenGLWidgets',
'PySide6.QtPdf',
'PySide6.QtPdfWidgets',
'PySide6.QtPositioning',
'PySide6.QtPrintSupport',
'PySide6.QtQml',
'PySide6.QtQuick',
'PySide6.QtQuick3D',
'PySide6.QtQuickControls2',
'PySide6.QtQuickWidgets',
'PySide6.QtRemoteObjects',
'PySide6.QtScxml',
'PySide6.QtSensors',
'PySide6.QtSerialPort',
'PySide6.QtSpatialAudio',
'PySide6.QtSql',
'PySide6.QtStateMachine',
'PySide6.QtSvg',
'PySide6.QtSvgWidgets',
'PySide6.QtTest',
'PySide6.QtUiTools',
'PySide6.QtWebChannel',
'PySide6.QtWebEngineCore',
'PySide6.QtWebEngineQuick',
'PySide6.QtWebEngineWidgets',
'PySide6.QtWebSockets',
'PySide6.QtXml',
],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='WAFPierce',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False, # Set to False for GUI app (no console window)
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=os.path.join(project_root, 'wafpierce', 'logo_Temp', 'logo_wafpierce.png') if os.path.exists(os.path.join(project_root, 'wafpierce', 'logo_Temp', 'logo_wafpierce.png')) else None,
)