-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Miguel Sanchez
authored and
Miguel Sanchez
committed
Jan 6, 2023
1 parent
7375d72
commit 8909343
Showing
7 changed files
with
60 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from colorama import Fore | ||
from plugins import agent_list | ||
from modules import sub_output | ||
import requests | ||
import sys | ||
|
||
|
||
user_agent_ = agent_list.get_useragent() | ||
header = {"User-Agent": user_agent_} | ||
|
||
def Servers_scan(url: str) -> str: | ||
sessions = requests.Session() | ||
server_output = [] | ||
r = sessions.get(url, verify=False, headers=header) | ||
try: | ||
if r.status_code == 200: | ||
for item, value in r.headers.items(): | ||
if item == "Server": | ||
server_output.append(value) | ||
if "Apache" in server_output: | ||
sub_output.subpro_scan(f"nuclei -u {url} -tags apache -silent") | ||
if "Nginx" in server_output: | ||
sub_output.subpro_scan(f"nuclei -u {url} -tags nginx -silent") | ||
if "IIS" in server_output: | ||
sub_output.subpro_scan(f"nuclei -u {url} -tags iis -silent") | ||
|
||
except requests.exceptions.InvalidSchema: | ||
print("Please use https://www.target.com") | ||
except requests.exceptions.ConnectionError: | ||
print("Check the target URL and try again\n") | ||
sys.exit() | ||
except requests.exceptions.MissingSchema: | ||
print("Invalid URL, please use http:// or https://") | ||
sys.exit() | ||
|
||
|