2015-09-29 22:50:22 +08:00
|
|
|
# -*- mode: python -*-
|
2016-07-20 05:53:41 +08:00
|
|
|
import os
|
2015-09-29 22:50:22 +08:00
|
|
|
import platform
|
2018-08-23 00:31:26 +08:00
|
|
|
|
|
|
|
# Name of zip file in monkey. That's the name of the file in the _MEI folder
|
2018-08-23 19:10:50 +08:00
|
|
|
MIMIKATZ_ZIP_NAME = 'tmpzipfile123456.zip'
|
2018-08-23 00:31:26 +08:00
|
|
|
|
|
|
|
|
|
|
|
def get_mimikatz_zip_path():
|
|
|
|
if platform.architecture()[0] == "32bit":
|
|
|
|
return '.\\bin\\mk32.zip'
|
|
|
|
else:
|
|
|
|
return '.\\bin\\mk64.zip'
|
|
|
|
|
|
|
|
|
2015-09-29 22:50:22 +08:00
|
|
|
a = Analysis(['main.py'],
|
2018-02-27 00:39:49 +08:00
|
|
|
pathex=['.', '..'],
|
2017-08-28 23:32:38 +08:00
|
|
|
hiddenimports=['_cffi_backend', 'queue'],
|
2015-09-29 22:50:22 +08:00
|
|
|
hookspath=None,
|
|
|
|
runtime_hooks=None)
|
2017-08-30 15:16:54 +08:00
|
|
|
|
2018-08-23 00:31:26 +08:00
|
|
|
a.binaries += [('sc_monkey_runner32.so', '.\\bin\\sc_monkey_runner32.so', 'BINARY')]
|
|
|
|
a.binaries += [('sc_monkey_runner64.so', '.\\bin\\sc_monkey_runner64.so', 'BINARY')]
|
2017-08-30 15:16:54 +08:00
|
|
|
|
2018-08-23 00:31:26 +08:00
|
|
|
if platform.system().find("Windows") >= 0:
|
2015-09-29 22:50:22 +08:00
|
|
|
a.datas = [i for i in a.datas if i[0].find('Include') < 0]
|
2018-08-29 21:56:55 +08:00
|
|
|
a.datas += [(MIMIKATZ_ZIP_NAME, get_mimikatz_zip_path(), 'BINARY')]
|
2015-09-29 22:50:22 +08:00
|
|
|
|
|
|
|
pyz = PYZ(a.pure)
|
|
|
|
exe = EXE(pyz,
|
|
|
|
a.scripts,
|
2017-08-16 20:14:26 +08:00
|
|
|
a.binaries + [('msvcr100.dll', os.environ['WINDIR'] + '\\system32\\msvcr100.dll', 'BINARY')],
|
2015-09-29 22:50:22 +08:00
|
|
|
a.zipfiles,
|
|
|
|
a.datas,
|
|
|
|
name='monkey.exe',
|
|
|
|
debug=False,
|
|
|
|
strip=None,
|
|
|
|
upx=True,
|
2018-08-23 19:10:50 +08:00
|
|
|
console=True,
|
|
|
|
icon='monkey.ico')
|