Skip to content

Commit 7730ed0

Browse files
Add files via upload
1 parent 08ff019 commit 7730ed0

File tree

4 files changed

+82
-0
lines changed

4 files changed

+82
-0
lines changed

File Compressor.py

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
import codecs, os, zlib
2+
3+
def setup():
4+
global file_to_obfuscatestr
5+
global curdirectory
6+
global a
7+
global imports
8+
global prepped
9+
10+
file_to_obfuscate = input("File you want to compress (needs to be in the same folder as the compressor): ")
11+
file_to_obfuscatestr = str(file_to_obfuscate)
12+
13+
curdirectory = os.path.dirname(os.path.abspath(__file__))
14+
15+
file_to_obfuscate_open = open(curdirectory+"\\"+file_to_obfuscatestr, "r")
16+
a = str(file_to_obfuscate_open.read())
17+
file_to_obfuscate_open.close()
18+
19+
20+
imports = """
21+
## Compressor made by: https://github.com/ComradeBypass
22+
23+
24+
import zlib
25+
import codecs
26+
"""
27+
28+
prepped = str(a.strip())
29+
30+
setup()
31+
32+
33+
def obfuscation(file):
34+
bruh = codecs.encode(file)
35+
a = str(zlib.compress(bruh, 9))
36+
c = r"exec(codecs.decode(zlib.decompress("+"bytes("+a+")"+")))"
37+
38+
39+
W = imports+c
40+
41+
try:
42+
creationoffile = open(curdirectory+"\\"+"Compressed_"+file_to_obfuscatestr, "x")
43+
creationoffile.close()
44+
except Exception:
45+
pass
46+
47+
creationoffile = open(curdirectory+"\\"+"Compressed_"+file_to_obfuscatestr, "w")
48+
creationoffile.write(W)
49+
creationoffile.close()
50+
51+
obfuscation(prepped)
52+
53+
54+
55+

how it looks.png

236 KB
Loading

important.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
--------------------------------------------------------------------------------------------------------------------------------
2+
Everything you are going to do with this size compressor is completely your choice, that means I dont take any consequences for it.
3+
--------------------------------------------------------------------------------------------------------------------------------
4+
You can compress anything you want, but again, if you do something bad, you will face the consequences.

readme.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
# File Size Compressor (Python)
3+
A 100% Python Compressor that uses zlib!
4+
5+
6+
## Documentation
7+
8+
- This Compressor makes your file size WAY SMALLER (if your file is 50kb - it would be like 20kb after compression!)
9+
- Its really effective when your file size is too large, or you have lots of repetetive code!
10+
11+
- You need to put your file in the same directory as the compressor file and open the compressor file, it will ask you for a file location, so for example: if my file was named "test" I would type test.py. After you type it, press enter. The Compressor will start to compress the file, it will create a completely new python file in the same directory that will be compressed.
12+
13+
## Requirements
14+
- All the packages that are needed are already pre-installed in python.
15+
- Its zlib, codecs
16+
17+
## Compressed Code
18+
![alt text](https://raw.githubusercontent.com/comradebypass/Comfuscate/main/how%20it%20looks.png)
19+
20+
## Operating Systems
21+
- Windows
22+
- (Not tested on linux) - Should work too
23+

0 commit comments

Comments
 (0)