1616print (red + """
1717
1818\t
19- \t |
20- \t |
21- \t -----+------ -----------
22- \t |
23- \t |
19+ \t +
20+ \t +
21+ \t + + + + + + + + + +
22+ \t +
23+ \t +
2424\t ) (
2525\t \ \ / /
2626\t \ |\ / |/
@@ -88,7 +88,7 @@ def decrypt(key, filename):
8888
8989
9090def check (key , filename ):
91- chunksize = 64 * 1024
91+ chunksize = 64 # * 1024
9292 secret = "0000hack1lab0000"
9393
9494 with open (filename , 'rb' ) as infile :
@@ -97,9 +97,8 @@ def check(key, filename):
9797
9898 chunk = infile .read (chunksize )
9999 test = decryptor .decrypt (chunk )
100- if secret not in test :
101- print (red + bold + "[!] Wrong Password!" + end )
102- exit (1 )
100+ if test [16 :32 ] != secret :
101+ exit (red + bold + "[!] Wrong Password!" + end )
103102
104103
105104
@@ -114,12 +113,14 @@ def main():
114113 parser .add_argument ("-d" , "--dcrypt" , help = "File Decryption" , type = str )
115114 parser .add_argument ("-p" , "--password" , help = "Password To Encrypt/Decrypt a File" , type = str )
116115 parser .add_argument ("-x" , "--delete" , help = "Delete The Original File" , action = 'store_true' )
116+ parser .add_argument ("-i" , "--ignore" , help = "Ignore The Check For The Password." , action = 'store_true' )
117117 args = parser .parse_args ()
118118
119119 enc = str (args .crypt )
120120 dec = str (args .dcrypt )
121121 password = str (args .password )
122122 dd = str (args .delete )
123+ ig = str (args .ignore )
123124
124125 if enc == "None" and dec == "None" :
125126 parser .print_help ()
@@ -139,7 +140,8 @@ def main():
139140
140141 elif dec != "None" :
141142 print (blue + "[+] Decrypt: " + end + "[ " + dec + " ]" )
142- check (getkey (password ), dec )
143+ if ig != 'True' :
144+ check (getkey (password ), dec )
143145 decrypt (getkey (password ), dec )
144146 name = dec .split (".hacklab" )[0 ]
145147 print (blue + "[+] Output: " + end + "[ " + name + " ]" )
0 commit comments