So, as u know I decided to learn python, I downloaded some books and all, but before starting with books and serious understanding of python I created a simple script to test my skills. I knew a bit how it worked from reading code, so I got my hands dirty and made one myself.
The script itself is extremely useless, maybe a troll, but as said before it was the first idea I got and wanted to see what I know.
google was my best friend, as most of the time I was seeing how some stuff worked, I got some help also from our very own super ninja programmer HTH, via IRC
I would also like to add that I did not copy paste anything from anywhere! I wrote it all myself, without snippets or anything, (Just the regex for the 0 or 000-255 range, hth gave it to me, but I went then to their website and understood how it worked;)
So here is the code:
print"////////////////////Khofo////////////////////////////////"
print"//////////////////PyCracker//////////////////////////////"
print"///////////////Version 1.0.0/////////////////////////////"
print"This application is intended for educational purposes only."
print"It shall be used with proper authorizations provided or by"
print"the system admin himslef"
print"---------------------------------------------------------"
print"This script is only effective on select number of clients"
print"////////////////Use at your own risks////////////////////"
#Define Target IP and
import re
while True:
ip = raw_input("Please Enter Target IPv4 Address:")
if re.match('^([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]).([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]).([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5]).([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])$',ip):
#The regex thing courtesy of HTH
break
print "ERROR:Invalid IPv4 Address Format try again"
#Now begins the trolololo
print"This is the target IP Address",ip
def start():
print"Please define the target computer's OS"
print"1. Windows (xp and above)"
print"2. Linux"
print"3. Mac OS"
print"4. Other"
os = raw_input("Number of the Target OS:")
##########################################
if os == "1":
print"Scanning Target"
print"Identifying vulnerabilities in Windows"
print"0%"
print"25%"
from time import sleep
sleep(5)
print"75%" #Yeah I was that bored
sleep(5)
print"Complete, exploiting.."
print"Password Acquired!" #The Password is a random dictionarie word!
import random
words = [line.strip() for line in open('C:\Users\Joseph\Desktop\PyCracker\data.txt')]
passwd = (random.choice(words))
print"The password for the defined target is:",passwd
elif os=="2":
print"Scanning Target"
print"Identifying vulnerabilities in Linux"
print"0%"
print"25%"
from time import sleep
sleep(5)
print"75%"
sleep(5)
print"Complete, exploiting.."
print"Password Acquired!"
import random
words = [line.strip() for line in open('C:\Users\*My name*\Desktop\PyCracker\data.txt')]
passwd = (random.choice(words))
print"The password for the defined target is:",passwd
elif os =="3":
print"Scanning Target"
print"Identifying vulnerabilities"
print"0%"
print"25%"
from time import sleep
sleep(5)
print"75%"
sleep(5)
print"Complete, exploiting.."
print"Password Acquired!"
import random
words = [line.strip() for line in open('C:\Users\Khofo\Desktop\PyCracker\data.txt')]
passwd = (random.choice(words))
print"The password for the defined target is:",passwd
elif os == "4":
print"Sorry other operating systems are not suported at the moment"
else:
print"Your input was Invalid, try again"
start()
############################################################################
print start()
############################################################################
print"---------------------------------------------------------------------"
print"Thank for using PyCrack, the most easy and relialble password cracker"
print"//////////////////////////////////End///////////////////////////////"
raw_input("Press Enter to exit:")
print"Bye"
############################################################################
#I know the protocol is 10000000% unrealistic but if I try this with my bro
#Or anyone who know nothing about computers I am sure he will believe me
#Anyway I did thi only to practice some python '