Skip to content

Commit

Permalink
Fix time package deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
k4m4 committed Mar 16, 2019
1 parent 91bdffc commit f4248df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Binary file added .DS_Store
Binary file not shown.
11 changes: 6 additions & 5 deletions onioff.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
See License at nikolaskama.me (https://nikolaskama.me/onioffproject)
"""

import socket, socks, requests, sys, os, time, optparse, datetime, re
import socket, socks, requests, sys, os, optparse, datetime, re
from urllib.request import urlopen
from termcolor import colored
from bs4 import BeautifulSoup
from time import process_time, sleep
from threading import Thread
import queue as queue

Expand Down Expand Up @@ -47,7 +48,7 @@ def nowPrint(msg, error=False, ext=False, heavy=False):
if ext:
sys.stdout.write(colored(msg_e, 'green', attrs = ['bold']))

time.sleep(0.1)
sleep(0.1)



Expand Down Expand Up @@ -198,7 +199,7 @@ def inspect():
onion = q.get()
response = checkOnion(onion)
sys.stdout.write(response+'\n')
time.sleep(0.1)
sleep(0.1)
q.task_done()

for i in range(concurrent):
Expand Down Expand Up @@ -246,7 +247,7 @@ def inspect():
nowPrint("[!] Onion inspection successfully complete", False, False, True)
saved_msg = "\n[!] Inspection report saved as --> " + str(outFile)
nowPrint(saved_msg, False, True, True)
print("\nComp/tional time elapsed:", (time.clock() - start))
print("\nComp/tional time elapsed:", (process_time() - start))

else:
nowPrint("\n[!] Use '-h' or '--help' for usage options\n", False, False, True)
Expand All @@ -255,7 +256,7 @@ def inspect():

if __name__ == '__main__':

start = time.clock()
start = process_time()

optparse.OptionParser.format_epilog = lambda self, formatter: self.epilog

Expand Down

0 comments on commit f4248df

Please sign in to comment.