Main Menu

CZFXP - FTPS Anonymous Login Scanner BETA v1.0

Started by CA, May 20, 2025, 03:51 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

CA



   █████████  ███████████     █████████    █████████  ███████████   █████ ███████████  ███████████ ███████████
  ███░░░░░███░█░░░░░░███     ███░░░░░███  ███░░░░░███░░███░░░░░███ ░░███ ░░███░░░░░███░█░░░███░░░█░█░░░░░░███
 ███     ░░░ ░     ███░     ░███    ░░░  ███     ░░░  ░███    ░███  ░███  ░███    ░███░   ░███  ░ ░     ███░ 
░███              ███       ░░█████████ ░███          ░██████████   ░███  ░██████████     ░███         ███   
░███             ███         ░░░░░░░░███░███          ░███░░░░░███  ░███  ░███░░░░░░      ░███        ███    
░░███     ███  ████     █    ███    ░███░░███     ███ ░███    ░███  ░███  ░███            ░███      ████     █
 ░░█████████  ███████████   ░░█████████  ░░█████████  █████   █████ █████ █████           █████    ███████████
  ░░░░░░░░░  ░░░░░░░░░░░     ░░░░░░░░░    ░░░░░░░░░  ░░░░░   ░░░░░ ░░░░░ ░░░░░           ░░░░░    ░░░░░░░░░░░

                                                                                                                   

The beginning, is just happening

CZFXP - FTPS Anonymous Login Scanner Python Script!

import socket
import ssl
import ipaddress

def check_ftps_access(ip):
    for port in [21, 990]:  # Check both port 21 and port 990
        try:
            # Create a socket object
            sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            sock.settimeout(2)  # Set a timeout for the connection attempt
            sock.connect((str(ip), port))  # Connect to the specified port

            # Wrap the socket with SSL
            context = ssl.create_default_context()
            with context.wrap_socket(sock, server_hostname=str(ip)) as ssock:
                # Attempt to login anonymously
                ssock.sendall(b'USER anonymous\r\n')
                response = ssock.recv(1024).decode()
                if '331' in response:  # Username accepted
                    ssock.sendall(b'PASS \r\n')  # Send empty password
                    response = ssock.recv(1024).decode()
                    if '230' in response:  # Login successful
                        return True
        except Exception as e:
            print(f"Error connecting to {ip} on port {port}: {e}")
    return False

def scan_ips(start_ip, end_ip):
    successful_ftps_ips = []

    # Generate IP addresses in the specified range
    for ip in ipaddress.summarize_address_range(ipaddress.IPv4Address(start_ip), ipaddress.IPv4Address(end_ip)):
        for single_ip in ip:
            if check_ftps_access(single_ip):
                print(f"FTPS access found on: {single_ip}")
                successful_ftps_ips.append(str(single_ip))

    return successful_ftps_ips

def save_successful_ftps_ips(successful_ftps_ips, output_file):
    with open(output_file, 'w') as file:
        for ip in successful_ftps_ips:
            file.write(f"{ip}\n")

if __name__ == "__main__":
    print("WELCOME TO THE CZ FTPS SCANNER")
   
    # Set the starting and ending IP addresses
    start_ip = input("Enter the starting IP address (e.g., 192.168.1.1): ")
    end_ip = input("Enter the ending IP address (e.g., 192.168.1.255): ")
   
    output_file = 'success_ftps.txt'
   
    successful_ftps_ips = scan_ips(start_ip, end_ip)
    save_successful_ftps_ips(successful_ftps_ips, output_file)

    print(f"Scan complete. Successful FTPS access found on the following IPs saved to {output_file}.")

Similar topics (5)