Skip to content

Commit

Permalink
Updated main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
RJP committed Jun 13, 2018
1 parent 824c592 commit 6178efa
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
Binary file added credentials.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion install.sh
Expand Up @@ -13,7 +13,7 @@ if [ "$choice_pip_requirements" == "Y" ] || [ "$choice_pip_requirements" == "y"
pip install -r requirements.txt
sudo apt-get install python-mysqldb
else
echo"[!] Make sure you have the right modules installed. You can check which modules are used in requirements.txt"
echo "[!] Make sure you have the right modules installed. You can check which modules are used in requirements.txt"
fi

echo "----------------------------------------------------------------"
Expand Down
30 changes: 28 additions & 2 deletions main.py
Expand Up @@ -19,6 +19,20 @@ class bcolors:
def exit_program():
sys.exit()


def list_scan_domains():
scan_id = raw_input('[Scan ID] > ')
cursor.execute ("select Domain, Program from domains where scan_Id = %s", (scan_id,))
data = cursor.fetchall()

for row in data:
print bcolors.BOLD + row[0] + bcolors.ENDC + " - " + bcolors.OKGREEN + row[1] + bcolors.ENDC

raw_input("\nPress any key to go back...")
start()



def list_subdomains():
sub_domain = raw_input('[Domain] > ')
cursor.execute ("select Domain, Active from domains where TopDomainID = (select DomainID from domains where Domain = %s) order by Domain", (sub_domain,))
Expand All @@ -34,6 +48,12 @@ def list_subdomains():
start()


def run_scan():
print "[!] Running scan..."
os.system("python " + os.path.dirname(os.path.abspath(__file__)) + "/run.py")



def run_subdomain_scan_on_target(top_domain_par = None):
if top_domain_par is None:
print "What is the domain?"
Expand Down Expand Up @@ -98,6 +118,8 @@ def insert_topdomain(top_domain_par = None):
start()




def insert_subdomain(top_domain_par = None):
if top_domain_par is None:
print "What is the (top)domain? "
Expand Down Expand Up @@ -181,7 +203,9 @@ def list_domains():
4 : insert_subdomain,
5 : run_subdomain_scan_on_target,
6 : delete_top_domain,
7 : exit_program
7 : list_scan_domains,
8 : run_scan,
9 : exit_program
}


Expand Down Expand Up @@ -210,7 +234,9 @@ def start():
4. Add subdomain
5. Run subdomain scan on top domain
6. Delete a (top)domain
7. Exit
7. Get domains from scan ID
8. Run scan on all domains
9. Exit
"""

print banner.format(bcolors.HEADER, domains, sub_domains, top_domains, bcolors.ENDC)
Expand Down

0 comments on commit 6178efa

Please sign in to comment.