Ejemplo n.º 1
0
    def __init__(self):
        """
		Objective :
		This is the constructor of the class and it creates instance of main processing class :
		main_class_based_backup.py
		"""

        self.NmapScanObj = main.NmapScan()
Ejemplo n.º 2
0
 def __init__(self):
     folder_dir = os.path.dirname(os.path.realpath(__file__))
     all_config_file = os.path.join(folder_dir, "all_commands.json")
     self.NmapScanObj = main.NmapScan()
     with open(all_config_file, "rb") as f:
         jsonpredata = json.loads(
             f.read())  #--> all service types in master json
     self.commandJson = jsonpredata
     self.commandsJson = jsonpredata
     self.IPexploit = IPexploits.IPexploits()
Ejemplo n.º 3
0
    def __init__(self):
        """
		Objective :
		This is the constructor of the class and its purpose is to initialise varipus class variables
		"""

        folder_dir = os.path.dirname(os.path.realpath(__file__))
        all_config_file = os.path.join(folder_dir, "all_commands.json")
        self.NmapScanObj = main.NmapScan()
        self.cppath = os.path.join(folder_dir, "nmap.cfg")
        self.SWITCH = ""
        self.takescan = "0"
        with open(all_config_file, "rb") as f:
            jsonpredata = json.loads(
                f.read())  #--> all service types in master json
        self.commandJson = jsonpredata
        self.commandsJson = jsonpredata
        self.IPexploit = IPexploits.IPexploits()
        self.record_id = []
        self.project_obj = IPtable.Projects()
        self.folder_dir = os.path.dirname(os.path.realpath(__file__))
        self.results_path = os.path.join(self.folder_dir, "Results")
Ejemplo n.º 4
0
 def __init__(self):
     self.NmapScanObj = main.NmapScan()
Ejemplo n.º 5
0
Objective :
The purpose of this file /module /Class is to launch discovery process with gui mode .
Invoker.py is actually responsible for calling main_class_based_backip.py along with project_id and relevent details like host ,port and switch etc.This would start the nmap discovery process and a process will keep on
running in the background which shall do the discovery and save the details in the database table.
"""

import main_class_based_backup as main
import os
import ConfigParser
import time
import psutil
import subprocess
import sys

NmapScanObj = main.NmapScan()

targethosts = sys.argv[1]
path = sys.argv[2]
targetports = sys.argv[3]
scan_type = sys.argv[4]
switch = sys.argv[5]
project_id = sys.argv[6]
mode = sys.argv[7]
assessment_id = sys.argv[8]
app_id = sys.argv[9]
concurrent = sys.argv[10]

print "concurrent is :" + str(concurrent)

if concurrent == "0":