Jump to content
×
×
  • Create New...

Search the Community

Showing results for tags 'ftp-scanner'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HOME
    • Shell_Meet
    • Shell_Talk
    • Board Meet
    • Announcements and Updates
    • Shell_Update
    • Pending Approvals
    • Member Introductions
    • Shell_Crew Support
  • HACKING & EXPLOITATION
    • Ctf Updates & Walkthroughs
    • Latest CVE-Info
    • Android/IOS Pentesting
    • Reverse Engineering
    • IoT Exploitation
    • Malware Analysis
    • API Pentesting
    • Cloud Security
    • Off-topic Lounge
  • CAREER
    • Internships
    • Career Discussion
    • Mentorship
    • Career Guidance
  • BUG BOUNTY
    • P5 (Informational Bugs)
    • P4 (Low-Level Bugs)
    • P3-P2 (High-Level Bugs)
    • P2-P1 (Critical Bugs)
    • Vulnerability Chaining
    • Report Writing
    • Personal Hunting Methodology
  • PROGRAMMING
    • Front-End Development
    • Scripting
    • Backend-Development
    • Application Development
    • Linux Kernel and OS Developers
    • Hardware Programming
    • DevOps
    • Queries Assessment
  • PROFESSIONAL CYBERSEC
    • Penetration Testing (Risk Assessment)
    • Red Teaming (Risk Assessment)
    • Blue Teaming (Risk Assessment)
    • Exploit Development (Risk Assessment)
    • OSINT-External and Internal (Threat Intelligence)
    • IOC (Threat Intelligence)
    • Awareness (Reinforcement)
    • Digital Forensics (Security Operations)
    • SOC & SIEM
  • Bug-Hunters's Resources
  • Open Source Contribution's Topics
  • Pentesting's Resources
  • SDR & AutoMobile Pentesting's Topics
  • Networking's Topics
  • Networking's Network Resources

Blogs

  • Open Source Contribution's Blogs

Categories

  • Bug-Hunt
  • Penetration Testing
  • Blue-Teaming

Product Groups

There are no results to display.

Categories

  • Pentesting
  • Bug-POC Videos
  • CTF-Walkthrough
  • Scripting
  • Bug-Hunters's Videos
  • SDR & AutoMobile Pentesting's Videos
  • Networking's Videos

Categories

  • Pentesting
  • Bug-Hunting
  • SDR & AutoMobile Pentesting's Tutorials

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me

Found 1 result

  1. """ Port-/FTP-Scanner """ import socket import threading import sys import time import argparse def CheckIfOpen(ip,port): target = (ip,int(port)) try: socket.create_connection(target,1.5) open('open','a').write(ip+":"+str(port)+"\n") print("Port: "+str(port)+" open on IP: "+ip+"!\n") except: print("Port: "+str(port)+" closed on IP: "+ip+"!\n") def CheckIfPub(target): try: server = (target,21) user = "USER anonymous\r\n" pwd = "PASS anonymous\r\n" sock = socket.socket() sock.connect(server) sock.recv(4096) sock.sendall(user.encode()) if "331" in sock.recv(4096).decode('utf-8'): sock.sendall(pwd.encode()) answer = sock.recv(4096).decode('utf-8') if "230" in answer: open('found_ftp','a').write(target+":21 anonymous:anonymous\n") sock.recv(4096) sock.close() elif "530" in answer: sock.close() else: sock.close() except: print("Login failed!\n") pass parser = argparse.ArgumentParser() parser.add_argument("scan", type=str,choices=["ftp","port"],help="decide whether to scan for pubs or ports.") parser.add_argument("ranges",type=str,help="specify the file containing the ranges to scan, format: 123.123.123.123 123.123.123.123") parser.add_argument("-t","--threads",type=int,help="specify amount of threads, else the default will be 100.") parser.add_argument("-p","--ports",type=str,help="specify the port or ports to scan if you decided to scan for open ports. format: port1,port2,port3,...") args = parser.parse_args() if args.threads: threads = args.threads else: threads = 100 ranges = open(args.ranges).read().splitlines() for ipranges in ranges: chain = ipranges.split(" ") start = chain[0].split(".") end = chain[1].split(".") if int(end[3]) != 255: end[3] = int(end[3])+1 else: if int(end[2]) != 255: end[2] = int(end[2])+1 end[3] = 0 else: if int(end[1]) != 255: end[1] = int(end[1])+1 end[2] = 0 end[3] = 0 else: if int(end[0]) != 255: end[0] = int(end[0])+1 end[1] = 0 end[2] = 0 end[3] = 0 end = str(end[0])+"."+str(end[1])+"."+str(end[2])+"."+str(end[3]) current = str(start[0])+"."+str(start[1])+"."+str(start[2])+"."+str(start[3]) if args.scan == "port": try: ports = args.ports.split(",") except: ports = args.ports elif args.scan == "pub": ports = 21 while(current != end): for port in ports: if threading.active_count() <= threads: if args.scan == "port": T = threading.Thread(target=CheckIfOpen,args=(current,int(port),)) elif args.scan == "ftp": T = threading.Thread(target=CheckIfPub,args=(current,)) T.start() else: time.sleep(0.2) if args.scan == "port": T = threading.Thread(target=CheckIfOpen,args=(current,int(port),)) elif args.scan == "ftp": T = threading.Thread(target=CheckIfPub,args=(current,)) T.start() progress = current.split(".") if int(progress[3]) != 255: progress[3] = int(progress[3])+1 else: if int(progress[2]) != 255: progress[2] = int(progress[2])+1 progress[3] = 0 else: if int(end[1]) != 255: progress[1] = int(progress[1])+1 progress[2] = 0 progress[3] = 0 else: if int(progress[0]) != 255: progress[0] = int(progress[0])+1 progress[1] = 0 progress[2] = 0 progress[3] = 0 current = str(progress[0])+"."+str(progress[1])+"."+str(progress[2])+"."+str(progress[3]) open('current_ip','w').write(current) T.join() print("Scan finished!\n") exit()