Package: backdoor-factory / 3.4.2+dfsg-4

python3_support.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
Description: Add support for python3
Author: Philippe Thierry.
Last-Update: 2018-08-09
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/arm/LinuxARMLELF32.py
+++ b/arm/LinuxARMLELF32.py
@@ -52,7 +52,7 @@
     def pack_ip_addresses(self):
         hostocts = []
         if self.HOST is None:
-            print "This shellcode requires a HOST parameter -H"
+            print("This shellcode requires a HOST parameter -H")
             sys.exit(1)
         for i, octet in enumerate(self.HOST.split('.')):
                 hostocts.append(int(octet))
@@ -162,7 +162,7 @@
         For user supplied shellcode
         """
         if self.SUPPLIED_SHELLCODE is None:
-            print "[!] User must provide shellcode for this module (-U)"
+            print("[!] User must provide shellcode for this module (-U)")
             sys.exit(0)
         else:
             supplied_shellcode = open(self.SUPPLIED_SHELLCODE, 'r+b').read()
--- a/intel/FreeBSDIntelELF32.py
+++ b/intel/FreeBSDIntelELF32.py
@@ -50,7 +50,7 @@
     def pack_ip_addresses(self):
         hostocts = []
         if self.HOST is None:
-            print "This shellcode requires a HOST parameter -H"
+            print ("This shellcode requires a HOST parameter -H")
             return False
         for i, octet in enumerate(self.HOST.split('.')):
                 hostocts.append(int(octet))
@@ -127,7 +127,7 @@
         For position independent shellcode from the user
         """
         if self.SUPPLIED_SHELLCODE is None:
-            print "[!] User must provide shellcode for this module (-U)"
+            print ("[!] User must provide shellcode for this module (-U)")
             return False
         else:
             supplied_shellcode = open(self.SUPPLIED_SHELLCODE, 'r+b').read()
--- a/intel/intelCore.py
+++ b/intel/intelCore.py
@@ -63,9 +63,9 @@
         compliment_you = random.randint(1, 4228250625)
         compliment_me = int('0xFFFFFFFF', 16) - compliment_you
         if self.VERBOSE is True:
-            print "First ones compliment:", hex(compliment_you)
-            print "2nd ones compliment:", hex(compliment_me)
-            print "'AND' the compliments (0): ", compliment_you & compliment_me
+            print("First ones compliment:", hex(compliment_you))
+            print("2nd ones compliment:", hex(compliment_me))
+            print("'AND' the compliments (0): ", compliment_you & compliment_me)
         self.compliment_you = struct.pack('<I', compliment_you)
         self.compliment_me = struct.pack('<I', compliment_me)
 
@@ -73,7 +73,7 @@
         """
         Updated to use Capstone-Engine
         """
-        print "[*] Reading win32 entry instructions"
+        print("[*] Reading win32 entry instructions")
         self.f.seek(self.flItms['LocOfEntryinCode'])
         self.count = 0
         self.flItms['ImpList'] = []
@@ -104,7 +104,7 @@
         """
         For x64 files. Updated to use Capstone-Engine.
         """
-        print "[*] Reading win64 entry instructions"
+        print("[*] Reading win64 entry instructions")
         self.f.seek(self.flItms['LocOfEntryinCode'], 0)
         self.count = 0
         self.flItms['ImpList'] = []
@@ -135,7 +135,7 @@
         This function takes the flItms dict and patches the
         executable entry point to jump to the first code cave.
         """
-        print "[*] Patching initial entry instructions"
+        print("[*] Patching initial entry instructions")
         self.f.seek(self.flItms['LocOfEntryinCode'], 0)
         #This is the JMP command in the beginning of the
         #code entry point that jumps to the codecave
@@ -154,7 +154,7 @@
         """
         For x64 exes...
         """
-        print "[*] Creating win64 resume execution stub"
+        print("[*] Creating win64 resume execution stub")
         #pause loop for code cave clearing stub
         resumeExe = ''
         resumeExe += "\x51"             # push ecx
@@ -270,7 +270,7 @@
         This section of code imports the self.flItms['ImpList'] from pe32_entry_instr
         to patch the executable after shellcode execution
         """
-        print "[*] Creating win32 resume execution stub"
+        print("[*] Creating win32 resume execution stub")
         resumeExe = ''
         # buffer for zeroing shellcode (no performance impact)
         resumeExe += "\x51"             # push ecx
--- a/intel/LinuxIntelELF32.py
+++ b/intel/LinuxIntelELF32.py
@@ -50,7 +50,7 @@
     def pack_ip_addresses(self):
         hostocts = []
         if self.HOST is None:
-            print "This shellcode requires a HOST parameter -H"
+            print("This shellcode requires a HOST parameter -H")
             return False
         for i, octet in enumerate(self.HOST.split('.')):
                 hostocts.append(int(octet))
@@ -124,7 +124,7 @@
         For user supplied shellcode
         """
         if self.SUPPLIED_SHELLCODE is None:
-            print "[!] User must provide shellcode for this module (-U)"
+            print("[!] User must provide shellcode for this module (-U)")
             return False
         else:
             supplied_shellcode = open(self.SUPPLIED_SHELLCODE, 'r+b').read()
--- a/intel/LinuxIntelELF64.py
+++ b/intel/LinuxIntelELF64.py
@@ -51,7 +51,7 @@
     def pack_ip_addresses(self):
         hostocts = []
         if self.HOST is None:
-            print "This shellcode requires a HOST parameter -H"
+            print("This shellcode requires a HOST parameter -H")
             return False
         for i, octet in enumerate(self.HOST.split('.')):
                 hostocts.append(int(octet))
@@ -121,7 +121,7 @@
         For user supplied shellcode
         """
         if self.SUPPLIED_SHELLCODE is None:
-            print "[!] User must provide shellcode for this module (-U)"
+            print("[!] User must provide shellcode for this module (-U)")
             return False
         else:
             supplied_shellcode = open(self.SUPPLIED_SHELLCODE, 'r+b').read()
--- a/intel/MachoIntel32.py
+++ b/intel/MachoIntel32.py
@@ -175,7 +175,7 @@
 
     def user_supplied_shellcode(self):
         if self.SUPPLIED_SHELLCODE is None:
-            print "[!] User must provide shellcode for this module (-U)"
+            print ("[!] User must provide shellcode for this module (-U)")
             return False
         else:
             supplied_shellcode = open(self.SUPPLIED_SHELLCODE, 'r+b').read()
--- a/intel/MachoIntel64.py
+++ b/intel/MachoIntel64.py
@@ -192,7 +192,7 @@
 
     def user_supplied_shellcode(self):
         if self.SUPPLIED_SHELLCODE is None:
-            print "[!] User must provide shellcode for this module (-U)"
+            print("[!] User must provide shellcode for this module (-U)")
             return False
         else:
             supplied_shellcode = open(self.SUPPLIED_SHELLCODE, 'r+b').read()
--- a/intel/WinIntelPE32.py
+++ b/intel/WinIntelPE32.py
@@ -92,7 +92,7 @@
             return False
 
         if self.HOST is None:
-            print "This payload requires a HOST parameter -H"
+            print("This payload requires a HOST parameter -H")
             return False
 
         #breakupvar is the distance between codecaves
@@ -160,7 +160,7 @@
             return False
 
         if self.HOST is None:
-            print "This payload requires a HOST parameter -H"
+            print("This payload requires a HOST parameter -H")
             return False
 
         flItms['stager'] = True
@@ -298,7 +298,7 @@
             return False
 
         if self.HOST is None:
-            print "This payload requires a HOST parameter -H"
+            print ("This payload requires a HOST parameter -H")
             return False
 
         flItms['stager'] = True
@@ -438,7 +438,7 @@
         flItms['stager'] = True
 
         if flItms['supplied_shellcode'] is None:
-            print "[!] User must provide shellcode for this module (-U)"
+            print ("[!] User must provide shellcode for this module (-U)")
             return False
         else:
             self.supplied_shellcode = open(self.SUPPLIED_SHELLCODE, 'r+b').read()
@@ -560,7 +560,7 @@
             return False
 
         if self.HOST is None:
-            print "This payload requires a HOST parameter -H"
+            print ("This payload requires a HOST parameter -H")
             return False
 
         self.shellcode1 = "\xfc"   # CLD
@@ -659,7 +659,7 @@
             return False
 
         if self.HOST is None:
-            print "This payload requires a HOST parameter -H"
+            print ("This payload requires a HOST parameter -H")
             return False
 
         flItms['stager'] = True
@@ -900,7 +900,7 @@
             return False
 
         if self.HOST is None:
-            print "This payload requires a HOST parameter -H"
+            print ("This payload requires a HOST parameter -H")
             return False
 
         flItms['stager'] = True
@@ -1154,7 +1154,7 @@
         flItms['stager'] = True
 
         if flItms['supplied_shellcode'] is None:
-            print "[!] User must provide shellcode for this module (-U)"
+            print ("[!] User must provide shellcode for this module (-U)")
             return False
         else:
             self.supplied_shellcode = open(self.SUPPLIED_SHELLCODE, 'r+b').read()
--- a/intel/WinIntelPE64.py
+++ b/intel/WinIntelPE64.py
@@ -95,7 +95,7 @@
             return False
 
         if self.HOST is None:
-            print "This payload requires a HOST parameter -H"
+            print ("This payload requires a HOST parameter -H")
             return False
 
         breakupvar = eat_code_caves(flItms, 0, 1)
@@ -171,7 +171,7 @@
             return False
 
         if self.HOST is None:
-            print "This payload requires a HOST parameter -H"
+            print ("This payload requires a HOST parameter -H")
             return False
 
         flItms['stager'] = True
@@ -435,7 +435,7 @@
             return False
 
         if self.HOST is None:
-            print "This payload requires a HOST parameter -H"
+            print ("This payload requires a HOST parameter -H")
             return False
 
         flItms['stager'] = True
@@ -715,7 +715,7 @@
         flItms['stager'] = True
 
         if flItms['supplied_shellcode'] is None:
-            print "[!] User must provide shellcode for this module (-U)"
+            print ("[!] User must provide shellcode for this module (-U)")
             return False
         else:
             self.supplied_shellcode = open(self.SUPPLIED_SHELLCODE, 'r+b').read()
@@ -943,7 +943,7 @@
             return False
 
         if self.HOST is None:
-            print "This payload requires a HOST parameter -H"
+            print ("This payload requires a HOST parameter -H")
             return False
 
         self.shellcode1 = "\xfc"   # CLD
@@ -1157,7 +1157,7 @@
             return False
 
         if self.HOST is None:
-            print "This payload requires a HOST parameter -H"
+            print ("This payload requires a HOST parameter -H")
             return False
 
         #overloading the class stackpreserve
@@ -1604,7 +1604,7 @@
             return False
 
         if self.HOST is None:
-            print "This payload requires a HOST parameter -H"
+            print ("This payload requires a HOST parameter -H")
             return False
 
         #overloading the class stackpreserve
@@ -1913,7 +1913,7 @@
                               )
 
         if flItms['supplied_shellcode'] is None:
-            print "[!] User must provide shellcode for this module (-U)"
+            print ("[!] User must provide shellcode for this module (-U)")
             return False
         else:
             self.supplied_shellcode = open(self.SUPPLIED_SHELLCODE, 'r+b').read()
--- a/osslsigncode/misc/pagehash.py
+++ b/osslsigncode/misc/pagehash.py
@@ -9,16 +9,16 @@
 f = open(sys.argv[1], 'rb')
 filehdr = f.read(1024)
 if filehdr[0:2] != 'MZ':
-    print "Not a DOS file."
+    print("Not a DOS file.")
     sys.exit(0)
 pepos = struct.unpack('<I', filehdr[60:64])[0]
 if filehdr[pepos:pepos+4] != 'PE\0\0':
-    print "Not a PE file."
+    print("Not a PE file.")
     sys.exit(0)
 pepos += 4
 
 nsections = struct.unpack('<H', filehdr[pepos+2:pepos+4])[0]
-print "#sections", nsections
+print("#sections", nsections)
 
 magic = struct.unpack('<H', filehdr[pepos+20:pepos+22])[0]
 pe32plus = 0
@@ -27,15 +27,15 @@
 elif magic == 0x10b:
     pe32plus = 0
 else:
-    print "Unknown magic", magic
+    print("Unknown magic", magic)
     sys.exit(0)
 
 sectoralign = struct.unpack('<I', filehdr[pepos+52:pepos+56])[0]
-print "Sector alignment", sectoralign
+print("Sector alignment", sectoralign)
 
 pos = pepos + 112 + pe32plus*16
 nrvas = struct.unpack('<I', filehdr[pos:pos+4])[0]
-print "#rvas", nrvas
+print("#rvas", nrvas)
 
 pos += 4
 tpos = pos
@@ -52,13 +52,13 @@
     sections.append((vsize,vaddr,rsize,raddr))
 
 hdrend = pos
-print "End of headers", pos
-print rvas
-print sections
+print("End of headers", pos)
+print(rvas)
+print(sections)
 
 sigpos,siglen = rvas[4]
 if sigpos == 0:
-    print "No signature found"
+    print("No signature found")
     sys.exit(0)
 
 f.seek(sigpos)
@@ -68,7 +68,7 @@
 oid_ph_v2 = "\x06\x01\x04\x01\x82\x37\x02\x03\x02"
 p = sigblob.find(cid_page_hash)
 if p == -1:
-    print "No page hash present"
+    print("No page hash present")
     sys.exit(0)
 
 p += len(cid_page_hash)
@@ -77,7 +77,7 @@
 if i == -1:
     i = sigblob.find(oid_ph_v2)
     if i == -1:
-        print "No page hash found"
+        print("No page hash found")
         sys.exit(0)
     sha1 = False
 p = i + len(oid_ph_v1)
@@ -106,9 +106,9 @@
 md.update(b)
 digest = md.hexdigest()
 
-print ""
-print "Checking page hash..."
-print ""
+print ("")
+print ("Checking page hash...")
+print ("")
 
 nph = [(0,digest)]
 lastpos = 0
@@ -136,4 +136,4 @@
     x=ph[i]
     y=nph[i]
     if x[0] != y[0] or x[1] != y[1]:
-        print "Not matching:", x, "!=", y
+        print ("Not matching:", x, "!=", y)
--- a/payloadtests.py
+++ b/payloadtests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 '''
 
 Copyright (c) 2013-2017, Joshua Pitts
@@ -64,9 +64,9 @@
     Usage: ./payloadtests.py file 127.0.0.1 8080
     '''
     if len(sys.argv) != 4:
-        print "Will create patched binaries for each stock shellcode/payload for the "
-        print "type of binary provided. Each payload type has it's own port number."
-        print "Usage:" + str(sys.argv[0]) + " binary HOST PORT"
+        print ("Will create patched binaries for each stock shellcode/payload for the ")
+        print ("type of binary provided. Each payload type has it's own port number.")
+        print ("Usage:" + str(sys.argv[0]) + " binary HOST PORT")
         sys.exit()
 
     file = sys.argv[1]
@@ -86,7 +86,7 @@
                 if 'cave_miner' in aShell or 'user_supplied' in aShell:
                     continue
                 aName = aShell + "." + patchtype + "." + str(host) + "." + str(port) + "." + file
-                print "Creating File:", aName
+                print ("Creating File:", aName)
                 if patchtype == 'APPEND':
                     supported_file = pebin.pebin(FILE=file, OUTPUT=aName,
                                                  SHELL=aShell, HOST=host,
@@ -113,7 +113,7 @@
             if 'cave_miner' in aShell or 'user_supplied' in aShell:
                 continue
             aName = aShell + "." + str(host) + "." + str(port) + "." + file
-            print "Creating File:", aName
+            print ("Creating File:", aName)
             supported_file = elfbin.elfbin(FILE=file, OUTPUT=aName,
                                            SHELL=aShell, HOST=host,
                                            PORT=port)
@@ -130,7 +130,7 @@
             if 'cave_miner' in aShell or 'user_supplied' in aShell:
                 continue
             aName = aShell + "." + str(host) + "." + str(port) + "." + file
-            print "Creating File:", aName
+            print ("Creating File:", aName)
             supported_file = machobin.machobin(FILE=file, OUTPUT=aName,
                                                SHELL=aShell, HOST=host,
                                                PORT=port, FAT_PRIORITY='ALL')
@@ -139,10 +139,10 @@
 
             port += 1
 
-    print "Successful files are in backdoored:"
+    print ("Successful files are in backdoored:")
     for afile, aresult in outputfiles.iteritems():
         if aresult is True:
-            print afile, 'Success'
+            print (afile, 'Success')
         else:
-            print afile, 'Fail'
+            print (afile, 'Fail')
             os.remove('backdoored/' + afile)
--- a/preprocessor/debug.py
+++ b/preprocessor/debug.py
@@ -40,7 +40,7 @@
         return self.result
 
     def print_debug(self):
-        print "*"*25, "DEBUG INFO", "*"*25
+        print ("*"*25, "DEBUG INFO", "*"*25)
 
         try:
             for item, data in vars(self.BDF).iteritems():
@@ -48,18 +48,18 @@
                 if item == 'flItms':
                     continue
                 # This will give ARGS info
-                print item, ":" ,data
+                print (item, ":" ,data)
             
             # BDF functions are exposed | print PE flItms (PE only)
             if 'flItms' in vars(self.BDF):
                 self.BDF.print_flItms(self.BDF.flItms)
 
-        except Exception, e:
-            print "!" * 50
-            print "\t[!] Exception:", str(e)
-            print "!" * 50
+        except e:
+            print ("!" * 50)
+            print ("\t[!] Exception:", str(e))
+            print ("!" * 50)
 
             self.result = False
 
-        print "*"*25, "END DEBUG INFO", "*"*25
+        print ("*"*25, "END DEBUG INFO", "*"*25)
 
--- a/preprocessor/nsis_3_0.py
+++ b/preprocessor/nsis_3_0.py
@@ -40,14 +40,14 @@
         self.nsis30()
 
     def nsis30(self):
-        print '\tNSIS 3.0 CRC32 Check | Patch Out Preprocessor'
+        print ('\tNSIS 3.0 CRC32 Check | Patch Out Preprocessor')
         with open(self.BDF.tmp_file.name, 'r+b') as self.f:
             self.check_NSIS()
             if self.nsis_binary is True:
-                print "\t[*] NSIS 3.0 Binary loaded"
+                print ("\t[*] NSIS 3.0 Binary loaded")
                 self.patch_crc32_check()
             else:
-                print "\t[*] NSIS 3.0 Binary NOT loaded"
+                print ("\t[*] NSIS 3.0 Binary NOT loaded")
 
     def check_NSIS(self):
         check_one = False
@@ -78,12 +78,12 @@
             locations.append(m.start())
          
         if len(locations) > 1:
-            print "\t[*] More than one binary match, picking first"
+            print ("\t[*] More than one binary match, picking first")
             match_loc = locations[0]
         else:
             match_loc = locations[0]
 
-        print "\t[*] Patch location", hex(match_loc)
+        print ("\t[*] Patch location", hex(match_loc))
         
         self.f.seek(match_loc + 4)
         self.f.write("\x84")
--- a/preprocessor/template.py
+++ b/preprocessor/template.py
@@ -44,9 +44,9 @@
         # add a tab for readability
         try:
 
-            print '\t[*] Default Template test complete'
+            print ('\t[*] Default Template test complete')
 
         #  Of course this doesn't fail
-        except Exception, e:
-            print "Why fail?", str(e)
+        except e:
+            print ("Why fail?", str(e))
             self.result = False
--- a/asm/build.py
+++ b/asm/build.py
@@ -38,7 +38,7 @@
 		p.wait()
 		xmit( name )
 	else:
-		print "[-] Unable to locate '%s.asm' in the src directory" % name
+		print ("[-] Unable to locate '%s.asm' in the src directory" % name)
 
 #=============================================================================#
 def xmit_dump_ruby( data, length=16 ):
@@ -49,20 +49,20 @@
 		if i+length <= len(data):
 			hex += " +"
 		dump += "%s\n" % ( hex )
-	print dump
+	print (dump)
 
 #=============================================================================#
 def xmit_offset( data, name, value, match_offset=0 ):
 	offset = data.find( value );
 	if offset != -1:
-		print "# %s Offset: %d" % ( name, offset + match_offset )
+		print ("# %s Offset: %d" % ( name, offset + match_offset ))
 
 #=============================================================================#
 def xmit( name, dump_ruby=True ):
 	bin = os.path.normpath( os.path.join( "./bin/", "%s.bin" % name ) )
 	f = open( bin, 'rb')
 	data = f.read()
-	print "# Name: %s\n# Length: %d bytes" % ( name, len( data ) )
+	print ("# Name: %s\n# Length: %d bytes" % ( name, len( data ) ))
 	xmit_offset( data, "Port", pack( ">H", 4444 ) )           # 4444
 	xmit_offset( data, "LEPort", pack( "<H", 4444 ) )         # 4444
 	xmit_offset( data, "Host", pack( ">L", 0x7F000001 ) )     # 127.0.0.1
@@ -84,7 +84,7 @@
 	if( name.find( "egghunter" ) >= 0 ):
 		null_count = data.count( "\x00" )
 		if( null_count > 0 ):
-			print "# Note: %d NULL bytes found." % ( null_count )
+			print ("# Note: %d NULL bytes found." % ( null_count ))
 	if dump_ruby:
 		xmit_dump_ruby( data )
 
@@ -94,9 +94,9 @@
 		argv = sys.argv
 	try:
 		if len( argv ) == 1:
-			print "Usage: build.py [clean|all|<name>]"
+			print ("Usage: build.py [clean|all|<name>]")
 		else:
-			print "# Built on %s\n" % (  time.asctime( time.localtime() ) )
+			print ("# Built on %s\n" % (  time.asctime( time.localtime() ) ))
 			if argv[1] == "clean":
 				clean()
 			elif argv[1] == "all":
@@ -120,8 +120,8 @@
 						build( name[:-4] )
 			else:
 				build( argv[1] )
-	except Exception, e:
-		print "[-] ", e
+	except e:
+		print ("[-] ", e)
 #=============================================================================#
 if __name__ == "__main__":
   main()