Skip to content

Commit 5d82079

Browse files
authored
Update crypto.py
1 parent 5363082 commit 5d82079

File tree

1 file changed

+24
-25
lines changed

1 file changed

+24
-25
lines changed

crypto.py

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python
22

3-
import os, time, argparse, getpass
3+
import os, argparse
4+
from getpass import getpass
45
# sudo pip install pycrypto
56
from Crypto.Cipher import AES
67
from Crypto.Hash import SHA256
@@ -14,29 +15,26 @@
1415
end = "\033[0m"
1516

1617
print(red+"""
17-
18-
\t
19-
\t +
20-
\t +
21-
\t + + + + + + + + + +
22-
\t +
23-
\t +
24-
\t ) (
25-
\t \ \ / /
26-
\t \ |\ / |/
27-
\t \| \ hack1lab / /
28-
\t \ |\ -------- / | /
29-
\t \ | \_______________________/ | /
30-
\t \ | | | | | |/
31-
\t \| | | | | /
32-
\t \____|______|______|______|___/
33-
34-
\t By: @hack1lab, @bing0o
35-
\t fb.me/hack1lab, fb.me/pOOn3r
36-
18+
|
19+
|
20+
----+---- ---------
21+
|
22+
|
23+
) (
24+
\ \ / /
25+
\ |\ / |/
26+
\| \ hack1lab / /
27+
\ |\ -------- / | /
28+
\ | \_______________________/ | /
29+
\ | | | | | |/
30+
\| | | | | /
31+
\____|______|______|______|___/
32+
33+
Files Encryption
34+
fb.me/hack1lab, @hack1lab
3735
"""+end)
3836

39-
def encrypt(key, filename):
37+
def encrypt(key, filename, ig):
4038
chunksize = 64*1024
4139
outputFile = filename+".hacklab"
4240
size = os.path.getsize(filename) #+ 16
@@ -50,7 +48,8 @@ def encrypt(key, filename):
5048
with open(outputFile, 'wb') as outfile:
5149
outfile.write(filesize.encode('utf-8'))
5250
outfile.write(IV)
53-
outfile.write(encryptor.encrypt(secret))
51+
if ig != 'True':
52+
outfile.write(encryptor.encrypt(secret))
5453

5554
while True:
5655
chunk = infile.read(chunksize)
@@ -127,11 +126,11 @@ def main():
127126
exit(1)
128127

129128
if password == "None":
130-
password = getpass.getpass()
129+
password = getpass()
131130

132131
if enc != "None":
133132
print(blue+"[+] Encrypt: "+end+"[ "+enc+" ]")
134-
encrypt(getkey(password), enc)
133+
encrypt(getkey(password), enc, ig)
135134
print(blue+"[+] Output: "+end+"[ "+enc+".hacklab"+" ]")
136135
if dd == "True":
137136
print(red+"[!] Remove: "+end+"[ "+enc+" ]")

0 commit comments

Comments
 (0)