Port Vulnerability Scanner

Python Hacking in Hindi – Port Vulnerability Scanner

Python Hacking

Python Hacking in HindiPython Port Vulnerability Scanner in Hindi – Aaj Ham Is Post Mai Sikhne Wale Hai Python Vulnerability Scanner Kaise create Kare Wo Bhi Step By Step And Ham Isme Kali Linux Inbuilt Commends Bhi Dekhne Wale Hai |

Hamne Previous Post Ye Dikha Tha Ki Particular Advanced Port Scanner With Example Agar Aapne Previous Post Ko Nhi Dekha Hai To Pahle Us Post Ko Jarur Dekhe |

Important Notice:- Friends Ye Python Hacking Course Keval Education Purpose ke Liye Hai Or Iska Istemal keval Education Ke liye hi Kare Naki kisi ko Nuksan Pauchane Ke Liye Agar Aap Kuch Wrong Karte Hai To Aap Hi Jimmedar Honge |

Python Port Vulnerability Scanner

Friends Ham Aaj Is Post Mai Ye Learn Karne Wale Hai ki Kisi Bhi Computer Ya Website Ka Port Open Hai Ya Nhi Agar Port Open Hai To Usme Kiya Vulnerability Hai |

What is Port Scanning? Port Scanning Kiya Hai

Port Scanning Ka Istemal Target Ke Open Ports Ke Bare Mai Pata Lagana Hota Hai Sath Hi Yeh Bhi Pata Kiya Jata Hai Ki Target Computer Par Kis Type Ki Services Run Ho Rahi Hai | Jaise Kisi Hacker Ka Target Computer Hai Tab Port Scanning Ki Help Se Hacker Targeted Computer Mai Open Ports And Chal Rahi Services Ke Bare Mai Information Collect Karta Hai Or Iska Istemal System Hack Karne Ke Liye Kiya Jata Hai |

Step 1:- Open Kali Linux

Sabse Pahle Aapko Kali Linux Open Karna Padega | Agar Aapne Abhi Tak Kali Linux ko Virtual Mai Install Nhi Kiya Hai To Mere Previous Post Ko Read Kar Sakte Hai Kali Linux Ko Virtual Box Mai Install Kar Sakte Hai |

Kali Linux Ko Open Karne Ke Bad Aapke Terminal Emulator Ko Open Karna Padega Uske Liye Aapko Keval Terminal Par Click Karna Hai |

Aap Upper Diye Gaye Image Ko Dekh Sakte Hai Hamne Terminal Ko Open Kar Liya Hai |

Step 2:- Coding an Port Vulnerability Scanner

Ab Ham Python Ki Help Se Port Vulnerability Scanner Create Karne Wale Hai | Ab Tak Hamne Jo Bhi Dekha Hai Wo Isliye Dekha Hai Taki Hamko Understand Karne Mai Koi Bhi Dikkat Na Ho Isliye Ham Ab Vulnerability Scanner Ke Liye Coding Kar Rahe Hai |

Ab Aapko Python File Create Karne ke Liye nano valscan.py likh kar enter press karna hai | Jaise ki Maine upper Diye Gaye Image Mai Dikhaya hai |

Also Read – Buy Hacking Course In Hindi

Uske Bad Ab Aapko Code Ko Likhna Hai Jo Ki Maine Niche Likha Hua Hai |

Example:

#!/usr/bin/python

import socket
import os
import sys

def retBanner(ip,port):
        try:
                socket.setdefaulttimeout(2)
                s = socket.socket()
                s.connect((ip,port))
                banner = s.recv(1024)
                return banner
        except:
                return

def checkVulns(banner,filename):
        f =  open(filename,  "r")
        for line in f.readlines():
                if line.strip("\n") in banner:
                        print("[+] Server is valnerable : " + banner.strip("\n")
                              def main():
        if len(sys.argv) == 2:
                filename = sys.argv[1]
                if not os.path.isfile(filename):
                        print("[-] File Doesnt Exist!")
                        exit(0)
        else:
            print("[-] Usage" + str(sys.argv[0]) + "<vuln filename>")
            exit(0)

        portlist = [21,22,25,80,110,443,445]
        for x in range(4,6):
                ip = "192.168.1" + str(x)
                for port in portlist:
                        banner = retBanner(ip,port)
                        if banner:
                                print("[+]" + ip + "/" + str(port) + ":" + banner)
                                checkValns(banner , filename)


main()

Uske Bad Aapko Ye Code Ko Type Karna Hai Or Fir Ise CTRL + O,to Save and fir Enter press Kar Dena hai or fir CTRL + X, to Exit Kar Dena hai |

Ab Aapko Ek nano vulnbanners.txt File Create Karni Hai And Usme Aapko Jo Bhi Device Par Port Vulnerability Check karni Hai Us Device Ka Name And Version Likhe Jaise Maine niche Image me Dikhaya Gaya Hai |

Uske Bad Aapko Ye Code Ko Type Karna Hai Or Fir Ise CTRL + O,to Save and fir Enter press Kar Dena hai or fir CTRL + X, to Exit Kar Dena hai |

Output:

Aap Dekh Sakte Hai Ki Hamne Server Is Vulnerable: SSH-2.0-OpenSSH_4.7pl Debian-Bubuntul Me Vulnerability Find Karni Hai |

Also Read – Coding a Simple Port Scanner

Leave a Reply

Your email address will not be published. Required fields are marked *