Пример #1
0
 def scan(self):
     aslog.log("Launching initial port scans")
     launch_terminal(BASIC_SCAN_SCRIPT,
                     format_script_args(self.ip, self.output_dir))
     launch_terminal(TCP_SCAN_SCRIPT,
                     format_script_args(self.ip, self.output_dir))
     launch_terminal(UDP_SCAN_SCRIPT,
                     format_script_args(self.ip, self.output_dir))
Пример #2
0
 def scan(self):
     aslog.log("Found https server - starting scans")
     launch_script_without_terminal(
         HTTPS_SCRIPT, format_script_args(self.ip, self.output_dir))
     launch_terminal(HTTPS_NIKTO_SCRIPT,
                     format_script_args(self.ip, self.output_dir))
     launch_terminal(HTTPS_DIRSEARCH_SCRIPT,
                     format_script_args(self.ip, self.output_dir),
                     keep_open=True)
Пример #3
0
 def scan(self):
     aslog.log("Found vnc server - starting scans")
     launch_script_without_terminal(
         VNC_SCRIPT, format_script_args(self.ip, self.output_dir))
Пример #4
0
 def scan(self):
     aslog.log("Found smtp server - starting scans")
     launch_script_without_terminal(
         SMTP_SCRIPT, format_script_args(self.ip, self.output_dir))
     aslog.log("Trying to scrape SMTP banner")
     self.scrape_banner("smtpbanner.txt")
Пример #5
0
# Get the target ip
TARGET_IP = argv[1]

# The target dir is just the IP address of the target
OUTPUT_DIR = "{0}/{1}/".format(getcwd(), TARGET_IP)

# Check if directory exists and offer to delete it
if path.isdir(OUTPUT_DIR):
    aslog.error_log("Output directory {0} already exists".format(OUTPUT_DIR))
    aslog.warning_log(
        "Do you want to remove the current directory and continue? (Y/N): ")
    answer = input()

    if answer is not None and str(answer).lower() == 'y':
        aslog.log("Removing existing directory")
        rmtree(OUTPUT_DIR)
    else:
        aslog.error_log("Unable to continue as directory already exists.")
        exit(1)

# Create a directory for this ip address
mkdir(OUTPUT_DIR)

aslog.log("Scanning {0} and sending output to {1}".format(
    TARGET_IP, OUTPUT_DIR))

# Build the service scanner factory
SERVICE_FACTORY = factory.build_service_factory(TARGET_IP, OUTPUT_DIR)

# Start the initial scans
Пример #6
0
 def scan(self):
     aslog.log("Found pop3 server - starting scans")
     launch_script_without_terminal(
         POP3_SCRIPT, format_script_args(self.ip, self.output_dir))
     aslog.log("Trying to scrape POP3 banner")
     self.scrape_banner("pop3banner.txt")