Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonked2 authored Jun 30, 2023
1 parent e266fe8 commit f3ece8b
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions egy.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import time
import logging
import tqdm

#----------------------------------------------------------
# Project: Egyscan
# Copyright (c) 2023 dragonked2
Expand Down Expand Up @@ -76,17 +77,16 @@ def check_lfi(url):
return False



def check_open_redirect(url):
payload = "http://www.google.com"
sanitized_url = urljoin(url, payload)
parsed_url = urlparse(sanitized_url)

if parsed_url.netloc in ALLOWED_HOSTS:
response = requests.get(sanitized_url)
if response.status_code == 200 and urlparse(response.url).netloc == "www.google.com":
return True

return False


Expand Down Expand Up @@ -298,26 +298,31 @@ def scan_response(response):


def main():
print("EgyScan V1.0")
print("EgyScan V1.1")
# Get the target URL from the user
target_url = input("Enter the target URL to scan for vulnerabilities: ")

print_logo()
print("EgyScan V1.0")
print("EgyScan V1.1")
# Collect URLs from the target website
logging.info("Collecting URLs from the target website...")
urls = collect_urls(target_url)

# Scan the collected URLs for vulnerabilities
logging.info("Scanning collected URLs for vulnerabilities...")
with ThreadPoolExecutor(max_workers=MAX_WORKERS) as executor:
futures = [executor.submit(scan_url, url) for url in islice(urls, MAX_WORKERS)]

futures = [executor.submit(scan_url, url) for url in urls]
for future in as_completed(futures):
try:
future.result()
except Exception as e:
logging.error(f"An error occurred while scanning a URL: {e}")
logging.error(f"Error occurred while scanning URL: {e}")

# Inject payloads into parameters, query, and form inputs
logging.info("Injecting payloads into parameters, query, and form inputs...")
inject_payloads(target_url)

logging.info("Scanning completed!")


if __name__ == "__main__":
Expand Down

0 comments on commit f3ece8b

Please sign in to comment.