@@ -195,39 +195,39 @@ def check_update_pups():
195
195
try :
196
196
with open (os .path .join (CWD , 'updates' ,
197
197
'PS4UPDATE_SYSTEM.PUP' ), 'rb' ) as buf :
198
- print ('>> Checking PS4UPDATE_SYSTEM.PUP\' s checksum' )
198
+ print ('>> Checking PS4UPDATE_SYSTEM.PUP\' s checksum' , end = ' \r ' )
199
199
hasher = hashlib .md5 ()
200
200
data = buf .read ()
201
201
hasher .update (data )
202
202
system_hash = hasher .hexdigest ().upper ()
203
203
if system_hash != '203C76C97F7BE5B881DD0C77C8EDF385' :
204
204
closer ('ERROR: PS4UPDATE_SYSTEM.PUP is not version 4.05' )
205
- print ('>> PS4UPDATE_SYSTEM.PUP checksum matches' )
205
+ print ('>> PS4UPDATE_SYSTEM.PUP checksum matches ' )
206
206
except IOError :
207
207
pass
208
208
209
209
try :
210
210
with open (os .path .join (CWD , 'updates' ,
211
211
'PS4UPDATE_RECOVERY.PUP' ), 'rb' ) as buf :
212
- print ('>> Checking PS4UPDATE_RECOVERY.PUP\' s checksum' )
212
+ print ('>> Checking PS4UPDATE_RECOVERY.PUP\' s checksum' , end = ' \r ' )
213
213
hasher = hashlib .md5 ()
214
214
data = buf .read ()
215
215
hasher .update (data )
216
216
recovery_hash = hasher .hexdigest ().upper ()
217
217
if recovery_hash != '741CFE2F0DEC1BB4663571DE78AE31CF' :
218
218
closer ('ERROR: PS4UPDATE_RECOVERY.PUP is not version 4.05' )
219
- print ('>> PS4UPDATE_RECOVERY.PUP checksum matches' )
219
+ print ('>> PS4UPDATE_RECOVERY.PUP checksum matches ' )
220
220
except IOError :
221
221
pass
222
222
223
223
224
224
def start_servers ():
225
225
"""Start DNS and HTTP servers on seperate threads"""
226
- print ('>> Starting DNS server thread...' )
226
+ print ('>> Starting DNS server thread...' , end = ' \r ' )
227
227
fakedns .main (DNS_LOC , DEBUG )
228
228
print ('>> DNS server thread is running...' )
229
229
230
- print ('>> Starting HTTP server thread...' )
230
+ print ('>> Starting HTTP server thread...' , end = ' \r ' )
231
231
server = ThreadedHTTPServer (('' , 80 ), MyHandler )
232
232
thread = threading .Thread (name = 'HTTP_Server' ,
233
233
target = server .serve_forever ,
@@ -266,12 +266,20 @@ def payload_menu(payloads):
266
266
"""Displays a menu with all available payloads in it"""
267
267
i = 1
268
268
choice = - 1
269
- print ('{} Payloads {}' .format ('-' * 4 , '-' * 46 ))
270
- print ('0. Don\' t send a payload' )
269
+ print ('┌────────────────────────────────────────────────────────┐' )
270
+ print ('│ Payloads │' )
271
+ print ('├────────────────────────────────────────────────────────┤' )
272
+ print ('│ 0. Don\' t send a payload │' )
271
273
for payload in payloads :
272
- print ('{}. {}' .format (i , payload ))
274
+ payload = '│ {}. {}' .format (i , payload )
275
+ while len (payload ) < 57 :
276
+ payload += ' '
277
+ payload += '│'
278
+ if len (payload ) > 58 :
279
+ payload = payload [:57 ] + '│'
280
+ print (payload )
273
281
i += 1
274
- print ('-' * 60 )
282
+ print ('└────────────────────────────────────────────────────────┘' )
275
283
while choice < 0 or choice >= i :
276
284
choice = input ('Choose a payload to send: ' )
277
285
try :
@@ -317,11 +325,19 @@ def exploit_menu():
317
325
exploits = os .listdir (EXPLOIT_LOC )
318
326
if not exploits :
319
327
closer ('ERROR: No exploits found' )
320
- print ('{} Exploits {}' .format ('-' * 4 , '-' * 46 ))
328
+ print ('┌────────────────────────────────────────────────────────┐' )
329
+ print ('│ Exploits │' )
330
+ print ('├────────────────────────────────────────────────────────┤' )
321
331
for exploit in exploits :
322
- print ('{}. {}' .format (i , exploit ))
332
+ exploit = '│ {}. {}' .format (i , exploit )
333
+ while len (exploit ) < 57 :
334
+ exploit += ' '
335
+ exploit += '│'
336
+ if len (exploit ) > 58 :
337
+ exploit = exploit [:57 ] + '│'
338
+ print (exploit )
323
339
i += 1
324
- print ('-' * 60 )
340
+ print ('└────────────────────────────────────────────────────────┘' )
325
341
while choice < 1 or choice >= i :
326
342
choice = input ('Choose an exploit to host: ' )
327
343
try :
@@ -354,7 +370,7 @@ def getch():
354
370
def closer (message ):
355
371
"""Closing method"""
356
372
print (message )
357
- if message != '>> Exiting...' :
373
+ if message != '\r >> Exiting...' :
358
374
print ('Press any key to exit...' , end = '' )
359
375
sys .stdout .flush ()
360
376
if os .name == 'nt' :
@@ -366,12 +382,25 @@ def closer(message):
366
382
sys .exit ()
367
383
368
384
385
+ def menu_header ():
386
+ """Very first thing that prints"""
387
+ print ('┌────────────────────────────────────────────────────────┐' )
388
+ print ('│ PS4 Exploit Host by Al Azif │' )
389
+ print ('└────────────────────────────────────────────────────────┘' )
390
+
391
+
392
+ def menu_padding (item , term_char ):
393
+ pass
394
+
395
+
369
396
def main ():
370
397
"""The main logic"""
371
398
global DEBUG
372
399
global AUTOSEND
373
400
global EXPLOIT_LOC
374
401
402
+ menu_header ()
403
+
375
404
if not check_root ():
376
405
closer ('ERROR: This must be run by root as it requires port 53 & 80' )
377
406
@@ -408,7 +437,12 @@ def main():
408
437
lan = get_lan ()
409
438
410
439
if write_conf (lan ):
411
- print ('>> Your DNS IP is {}' .format (lan ))
440
+ while len (lan ) < 15 :
441
+ lan += ' '
442
+ print ('╔════════════════════════════════════════════════════════╗' )
443
+ print ('║ Your DNS IP is {} ║' .format (lan ))
444
+ print ('╚════════════════════════════════════════════════════════╝' )
445
+ # print('>> Your DNS IP is {}'.format(lan))
412
446
else :
413
447
closer ('ERROR: Unable to write {}' .format (DNS_LOC ))
414
448
@@ -417,7 +451,7 @@ def main():
417
451
while True :
418
452
pass
419
453
except KeyboardInterrupt :
420
- closer ('>> Exiting...' )
454
+ closer ('\r >> Exiting...' )
421
455
422
456
423
457
if __name__ == '__main__' :
0 commit comments