Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
Python-3.10.14 /
Tools /
freeze /
Delete
Unzip
Name
Size
Permission
Date
Action
test
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
README
12.36
KB
-rw-r--r--
2024-03-19 22:46
bkfile.py
664
B
-rw-r--r--
2024-03-19 22:46
checkextensions.py
2.57
KB
-rw-r--r--
2024-03-19 22:46
checkextensions_win32.py
6.08
KB
-rw-r--r--
2024-03-19 22:46
extensions_win32.ini
3.9
KB
-rw-r--r--
2024-03-19 22:46
flag.py
41
B
-rw-r--r--
2024-03-19 22:46
freeze.py
16.75
KB
-rwxr-xr-x
2024-03-19 22:46
hello.py
24
B
-rw-r--r--
2024-03-19 22:46
makeconfig.py
1.63
KB
-rw-r--r--
2024-03-19 22:46
makefreeze.py
2.71
KB
-rw-r--r--
2024-03-19 22:46
makemakefile.py
916
B
-rw-r--r--
2024-03-19 22:46
parsesetup.py
2.94
KB
-rw-r--r--
2024-03-19 22:46
regen_frozen.py
1.25
KB
-rw-r--r--
2024-03-19 22:46
win32.html
7.01
KB
-rw-r--r--
2024-03-19 22:46
winmakemakefile.py
4.88
KB
-rw-r--r--
2024-03-19 22:46
Save
Rename
#!/usr/bin/env python3 import sys import os import marshal DIR = os.path.dirname(sys.argv[0]) # source code for module to freeze FILE = os.path.join(DIR, 'flag.py') # C symbol to use for array holding frozen bytes SYMBOL = 'M___hello__' def get_module_code(filename): """Compile 'filename' and return the module code as a marshalled byte string. """ with open(filename, 'r') as fp: src = fp.read() co = compile(src, 'none', 'exec') co_bytes = marshal.dumps(co) return co_bytes def gen_c_code(fp, co_bytes): """Generate C code for the module code in 'co_bytes', write it to 'fp'. """ def write(*args, **kwargs): print(*args, **kwargs, file=fp) write('/* Generated with Tools/freeze/regen_frozen.py */') write('static unsigned char %s[] = {' % SYMBOL, end='') bytes_per_row = 13 for i, opcode in enumerate(co_bytes): if (i % bytes_per_row) == 0: # start a new row write() write(' ', end='') write('%d,' % opcode, end='') write() write('};') def main(): out_filename = sys.argv[1] co_bytes = get_module_code(FILE) with open(out_filename, 'w') as fp: gen_c_code(fp, co_bytes) if __name__ == '__main__': main()