From 467d8b1514bcace013992718b23e4d83fc958d42 Mon Sep 17 00:00:00 2001 From: Pankaj Mourya Date: Mon, 3 Jun 2024 18:33:46 +0530 Subject: [PATCH] Initial commit --- .vscode/settings.json | 21 + Test/test_server.py | 115 + __pycache__/dom_scanner.cpython-312.pyc | Bin 0 -> 1231 bytes __pycache__/nmap.cpython-312.pyc | Bin 0 -> 582 bytes __pycache__/xsstrike.cpython-312.pyc | Bin 0 -> 9901 bytes download/deshonnati.txt | 134 + download/epaper_deshonnati.txt | 201 + download/nasa.json | 8686 +++++++++++++++++ download/tmpmlt80600.txt | 203 + download/tmpq2xylk69.txt | 63 + download/tmpqdyfx23d.txt | 203 + download/tmpsjomaco9.txt | 16 + download/tmptcol_tn1.txt | 16 + modes/__init__.py | 1 + modes/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 135 bytes modes/__pycache__/bruteforcer.cpython-312.pyc | Bin 0 -> 2246 bytes modes/__pycache__/crawl.cpython-312.pyc | Bin 0 -> 3205 bytes modes/__pycache__/scan.cpython-312.pyc | Bin 0 -> 6485 bytes modes/__pycache__/singleFuzz.cpython-312.pyc | Bin 0 -> 2596 bytes modes/bruteforcer.py | 39 + modes/crawl.py | 63 + modes/scan.py | 120 + modes/singleFuzz.py | 47 + plugins/__init__.py | 1 + plugins/__pycache__/__init__.cpython-312.pyc | Bin 0 -> 137 bytes plugins/__pycache__/retireJs.cpython-312.pyc | Bin 0 -> 9526 bytes plugins/retireJs.py | 218 + server.py | 113 + static/aboutstyle.css | 129 + static/helpstyle.css | 215 + static/images/bg.jpg | Bin 0 -> 224646 bytes static/images/download-icon.png | Bin 0 -> 903 bytes static/images/icon.png | Bin 0 -> 28007 bytes static/images/icon2.png | Bin 0 -> 47762 bytes static/images/logo.png | Bin 0 -> 85160 bytes static/images/team1.jpg | Bin 0 -> 100464 bytes static/images/team2.jpg | Bin 0 -> 53906 bytes static/images/team3.jpg | Bin 0 -> 146537 bytes static/loginstyle.css | 238 + static/style.css | 274 + templates/about.html | 127 + templates/api.txt | 1 + templates/createaccount.html | 102 + templates/help.html | 61 + templates/index.html | 116 + templates/login.html | 97 + templates/login.js | 59 + templates/result.html | 115 + templates/script.js | 134 + templates/signup.js | 123 + templates/stylee.css | 157 + 51 files changed, 12208 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 Test/test_server.py create mode 100644 __pycache__/dom_scanner.cpython-312.pyc create mode 100644 __pycache__/nmap.cpython-312.pyc create mode 100644 __pycache__/xsstrike.cpython-312.pyc create mode 100644 download/deshonnati.txt create mode 100644 download/epaper_deshonnati.txt create mode 100644 download/nasa.json create mode 100644 download/tmpmlt80600.txt create mode 100644 download/tmpq2xylk69.txt create mode 100644 download/tmpqdyfx23d.txt create mode 100644 download/tmpsjomaco9.txt create mode 100644 download/tmptcol_tn1.txt create mode 100644 modes/__init__.py create mode 100644 modes/__pycache__/__init__.cpython-312.pyc create mode 100644 modes/__pycache__/bruteforcer.cpython-312.pyc create mode 100644 modes/__pycache__/crawl.cpython-312.pyc create mode 100644 modes/__pycache__/scan.cpython-312.pyc create mode 100644 modes/__pycache__/singleFuzz.cpython-312.pyc create mode 100644 modes/bruteforcer.py create mode 100644 modes/crawl.py create mode 100644 modes/scan.py create mode 100644 modes/singleFuzz.py create mode 100644 plugins/__init__.py create mode 100644 plugins/__pycache__/__init__.cpython-312.pyc create mode 100644 plugins/__pycache__/retireJs.cpython-312.pyc create mode 100644 plugins/retireJs.py create mode 100644 server.py create mode 100644 static/aboutstyle.css create mode 100644 static/helpstyle.css create mode 100644 static/images/bg.jpg create mode 100644 static/images/download-icon.png create mode 100644 static/images/icon.png create mode 100644 static/images/icon2.png create mode 100644 static/images/logo.png create mode 100644 static/images/team1.jpg create mode 100644 static/images/team2.jpg create mode 100644 static/images/team3.jpg create mode 100644 static/loginstyle.css create mode 100644 static/style.css create mode 100644 templates/about.html create mode 100644 templates/api.txt create mode 100644 templates/createaccount.html create mode 100644 templates/help.html create mode 100644 templates/index.html create mode 100644 templates/login.html create mode 100644 templates/login.js create mode 100644 templates/result.html create mode 100644 templates/script.js create mode 100644 templates/signup.js create mode 100644 templates/stylee.css diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..8f02b4f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,21 @@ +{ + "cSpell.words": [ + "CURLOPT", + "fuzzywuzzy", + "gaierror", + "jsonify", + "nmap", + "RETURNTRANSFER", + "sqli", + "sqlmap", + "VERIFYHOST", + "VERIFYPEER", + "xsstrike" + ], + "python.analysis.extraPaths": [ + "./test box/templates" + ], + "[python]": { + "editor.defaultFormatter": "ms-python.autopep8" + } +} \ No newline at end of file diff --git a/Test/test_server.py b/Test/test_server.py new file mode 100644 index 0000000..d32445c --- /dev/null +++ b/Test/test_server.py @@ -0,0 +1,115 @@ +from flask import Flask, request, render_template, jsonify +import socket +from urllib.parse import urlparse, parse_qs +from bs4 import BeautifulSoup +import requests + +app = Flask(__name__) + +@app.route('/') +def index(): + return render_template('index.html') + +@app.route('/about') +def about(): + return render_template('about.html') + +@app.route('/login') +def login(): + return render_template('login.html') + +@app.route('/help') +def help(): + return render_template('help.html') + +@app.route('/createaccount') +def create_account(): + return render_template('createaccount.html') + +@app.route('/scan', methods=['POST']) +def scan(): + url = request.form['url'] + ip_address, server_name = get_ip_address_and_server_name_from_url(url) + params = extract_params(url) + + # Extract subdomains + subdomains = extract_subdomains(url) + + # Extract URLs + urls = extract_urls(url) + + result = { + 'url': urlparse(url).netloc, + 'IP Address': ip_address, + 'URLs': urls, + 'Subdomains': subdomains + } + + return render_template('result.html', result=result) + +def get_ip_address_and_server_name_from_url(url): + try: + domain = urlparse(url).netloc + ip_address = socket.gethostbyname(domain) + server_name = socket.gethostbyaddr(ip_address)[0] + return ip_address, server_name + except socket.gaierror as e: + print(f"Error getting IP address and server name: {e}") + return None, None + except Exception as e: + print(f"Unexpected error: {e}") + return None, None + +def extract_subdomains(url): + subdomains = {} + try: + domain = urlparse(url).netloc + subdomains[domain] = find_subdomains(domain) + except Exception as e: + print(f"Error extracting subdomains: {e}") + return subdomains + +def find_subdomains(domain): + url = f"https://crt.sh/?q=%.{domain}&output=json" + try: + response = requests.get(url) + if response.status_code == 200: + data = response.json() + subdomains = [] + for entry in data: + subdomains.append(entry['name_value']) + return subdomains + else: + return [] + except requests.RequestException as e: + print(f"Error fetching subdomains: {e}") + return [] + +def extract_urls(url): + urls = [] + try: + response = requests.get(url) + if response.status_code == 200: + soup = BeautifulSoup(response.content, "html.parser") + for link in soup.find_all("a"): + href = link.get("href") + if href: + if urlparse(href).netloc: + urls.append(href) + else: + urls.append(urlparse(url)._replace(path=href).geturl()) + except Exception as e: + print(f"Error extracting URLs: {e}") + return urls + +def extract_params(url): + try: + parsed_url = urlparse(url) + params = parse_qs(parsed_url.query) + return params + except Exception as e: + print(f"Error extracting parameters: {e}") + return {} + +if __name__ == '__main__': + app.run(host='0.0.0.0', debug=True) diff --git a/__pycache__/dom_scanner.cpython-312.pyc b/__pycache__/dom_scanner.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..402236d29a7fe9b2d65b346838c9872f0bb55b2d GIT binary patch literal 1231 zcmah|&ubJ(6n@p!J>BUfHnaKVL?jcF!#0RP#7kJr!m5!yWQ9@DL1;QtHE|~0(_?jy z*%24URWP3PASMeQJg!9i6U4ih(LvNQmt}=zPmbmyIa$?CcN7E*>eZ|I>b-jJd#|1j z4w@jw!FRjM_xb_;m78R!J!R{$P}YC|K^_$4s(8p(ii(em*jJ0HuN5`)U0eaG(98z< z?6s&9d>x7g)vH6vgF7oxiME6uW;T@1XGFga8$Gya(hM<{e*|Dd!g_4SD$z*aLo;~? zK@&BR-T%J?7i^Vl$2~V(<~pMn8#Ii#UJZj%VmfTv6vIF%d-z7XcJ66mRRn@L!>9iUsKPls4qdHxYgw@u`9q1N)&=CsYjxg zl>*q>0+V@hEoS@jp3^mV(WCh&$P20i?-I?+s^n!+DtAOj*cm3%;%YfyKF5ONm{=yG zmn|1IyeMSiqd~7sY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dxd%M=~U+qn`_ocmkpO*B) z`wpU@O4?lNeOxO0C#(01Hi+A=o}4x@&dOghR{GeNZdi*_u2T;>)2@Ma>tN39U2MO7 z a@$m^GP(Ei_z&|%AxT$iCH-6s0!uWq*DH}lm literal 0 HcmV?d00001 diff --git a/download/deshonnati.txt b/download/deshonnati.txt new file mode 100644 index 0000000..a028eaf --- /dev/null +++ b/download/deshonnati.txt @@ -0,0 +1,134 @@ +{ + "ip_address": "209.42.255.3", + "subdomains": [ + "deshonnati.com", + "www.facebook.com", + "www.instagram.com", + "foxiz.themeruby.com", + "facebook.com", + "www.youtube.com", + "instagram.com", + "deshonnati.com#", + "twitter.com" + ], + "urls": [ + "https://deshonnati.com/eating-prasad-in-temple-varora-poisoning-case/", + "https://deshonnati.com/firing-at-salman-khan-house/", + "https://deshonnati.com/200-crore-property-donation-to-accept-monkhood/", + "https://deshonnati.com/category/%e0%a4%ae%e0%a4%a8%e0%a4%b8%e0%a5%8d%e0%a4%b5%e0%a4%bf%e0%a4%a8%e0%a5%80/", + "https://deshonnati.com/category/apale-sahar/vidharbha/akola/", + "https://www.facebook.com/Deshonnati/", + "https://deshonnati.com/category/apale-sahar/vidharbha/washim/", + "https://deshonnati.com/category/apale-sahar/marathwada/%e0%a4%aa%e0%a4%b0%e0%a4%ad%e0%a4%a3%e0%a5%80/", + "https://deshonnati.com/contact-us/", + "https://deshonnati.com/hingoli-police-crime-branch-team/", + "https://deshonnati.com/big-operation-of-the-election-department-in-the-district/", + "https://deshonnati.com/category/apale-sahar/vidharbha/vardha/", + "https://deshonnati.com/category/apale-sahar/%e0%a4%89%e0%a4%a4%e0%a5%8d%e0%a4%a4%e0%a5%8d%e0%a4%a4%e0%a4%b0-%e0%a4%ae%e0%a4%b9%e0%a4%be%e0%a4%b0%e0%a4%be%e0%a4%b7%e0%a5%8d%e0%a4%9f%e0%a5%8d%e0%a4%b0/%e0%a4%9c%e0%a4%b3%e0%a4%97%e0%a4%be%e0%a4%b5/", + "https://deshonnati.com/major-accident-was-avoided-when-chandrapur-railway/", + "https://deshonnati.com/category/apale-sahar/marathwada/%e0%a4%ac%e0%a5%80%e0%a4%a1/", + "https://deshonnati.com/category/apale-sahar/vidharbha/chandrapur/", + "https://deshonnati.com/category/apale-sahar/marathwada/%e0%a4%a8%e0%a4%be%e0%a4%82%e0%a4%a6%e0%a5%87%e0%a4%a1/", + "https://deshonnati.com/server-down-farmers-confused-about-subsidy/", + "https://deshonnati.com/firing-outside-salman-khan-house/", + "https://deshonnati.com/category/%e0%a4%b8%e0%a4%82%e0%a4%aa%e0%a4%be%e0%a4%a6%e0%a4%95%e0%a5%80%e0%a4%af/prahar/", + "https://deshonnati.com/wp-login.php?action=lostpassword", + "https://deshonnati.com/pohradevi-pilgrims-system-buvaneshwari-s/", + "https://deshonnati.com/mobile-team-in-hingoli-lok-sabha-constituency/", + "https://deshonnati.com/760-vacancies-of-junior-assistant-in-delhi-jal-board/", + "https://deshonnati.com/hanuman-janmotsav-simple-remedy-on-hanuman-jayanti/", + "https://deshonnati.com/category/apale-sahar/%e0%a4%89%e0%a4%a4%e0%a5%8d%e0%a4%a4%e0%a5%8d%e0%a4%a4%e0%a4%b0-%e0%a4%ae%e0%a4%b9%e0%a4%be%e0%a4%b0%e0%a4%be%e0%a4%b7%e0%a5%8d%e0%a4%9f%e0%a5%8d%e0%a4%b0/%e0%a4%a8%e0%a4%be%e0%a4%b6%e0%a4%bf%e0%a4%95/", + "https://deshonnati.com/%e0%a4%8f%e0%a4%95%e0%a4%be-%e0%a4%9f%e0%a4%95%e0%a5%8d%e0%a4%95%e0%a5%8d%e0%a4%af%e0%a4%be%e0%a4%9a%e0%a5%8d%e0%a4%af%e0%a4%be-%e0%a4%a8%e0%a4%ab%e0%a5%8d%e0%a4%af%e0%a4%be%e0%a4%b8%e0%a4%be/", + "https://deshonnati.com/good-news-for-instagram-users-meta-launched/", + "https://deshonnati.com/tigress-was-again-set-free-with-a-radio-collar/", + "https://deshonnati.com/category/%e0%a4%ae%e0%a4%a8%e0%a5%8b%e0%a4%b0%e0%a4%82%e0%a4%9c%e0%a4%a8/", + "https://deshonnati.com/%e0%a4%a4%e0%a5%81%e0%a4%b2%e0%a4%a8%e0%a4%be-%e0%a4%95%e0%a5%87%e0%a4%b2%e0%a5%8d%e0%a4%af%e0%a4%be%e0%a4%a8%e0%a5%87-%e0%a4%a8%e0%a5%8d%e0%a4%af%e0%a5%82%e0%a4%a8%e0%a4%97%e0%a4%82%e0%a4%a1/", + "https://deshonnati.com/britain-jumped-into-the-war-between-iran-and-israel/", + "https://deshonnati.com/srh-vs-rcb-will-clash-today/", + "https://deshonnati.com/category/%e0%a4%ac%e0%a4%bf%e0%a4%9d%e0%a4%a8%e0%a5%87%e0%a4%b8/", + "https://deshonnati.com/wp-login.php?redirect_to=https%3A%2F%2Fdeshonnati.com", + "https://deshonnati.com/category/videsh/", + "https://deshonnati.com/category/desh/", + "https://deshonnati.com/cartridge-in-the-net-of-local-crime-branch/", + "https://deshonnati.com#", + "https://deshonnati.com/donate-these-items-if-you-want-to-please-mother-queen/", + "https://deshonnati.com/privacy-policy/", + "https://deshonnati.com/pm-narendra-modi-schemes-mentioned-in-bjps-manifesto/", + "https://deshonnati.com/category/apale-sahar/pune/", + "https://deshonnati.com/about-deshonnati/", + "https://deshonnati.com/salute-to-surya-chila-who-sowed-the-seeds-of-revolution/", + "https://deshonnati.com/assault-with-a-sharp-weapon/", + "https://deshonnati.com/%e0%a4%b5%e0%a4%9c%e0%a4%be%e0%a4%ac%e0%a4%be%e0%a4%95%e0%a5%80%e0%a4%9a%e0%a5%80%e0%a4%9a-%e0%a4%b6%e0%a4%95%e0%a5%8d%e0%a4%af%e0%a4%a4%e0%a4%be-%e0%a4%85%e0%a4%a7%e0%a4%bf%e0%a4%95/", + "https://deshonnati.com/", + "https://deshonnati.com/category/apale-sahar/marathwada/", + "https://deshonnati.com/supreme-court-denies-immediate-relief-arvind-kejriwal/", + "https://deshonnati.com/malpractice-in-police-patil-exam-a-crime-against-both/", + "https://deshonnati.com/category/%e0%a4%b8%e0%a4%82%e0%a4%aa%e0%a4%be%e0%a4%a6%e0%a4%95%e0%a5%80%e0%a4%af/agralekh/", + "https://instagram.com/https://www.instagram.com/deshonnati/", + "https://deshonnati.com/category/apale-sahar/vidharbha/buldhana/", + "https://deshonnati.com/category/apale-sahar/%e0%a4%89%e0%a4%a4%e0%a5%8d%e0%a4%a4%e0%a5%8d%e0%a4%a4%e0%a4%b0-%e0%a4%ae%e0%a4%b9%e0%a4%be%e0%a4%b0%e0%a4%be%e0%a4%b7%e0%a5%8d%e0%a4%9f%e0%a5%8d%e0%a4%b0/%e0%a4%a8%e0%a4%82%e0%a4%a6%e0%a5%81%e0%a4%b0%e0%a4%ac%e0%a4%be%e0%a4%b0/", + "https://deshonnati.com/category/apale-sahar/vidharbha/amaravati/", + "https://deshonnati.com/category/apale-sahar/%e0%a4%95%e0%a5%8b%e0%a4%95%e0%a4%a3/", + "https://deshonnati.com/category/sport/", + "https://deshonnati.com/57-people-died-due-to-flood-lightning-in-pakistan/", + "https://deshonnati.com/warning-of-boycott-of-lok-sabha-elections/", + "https://deshonnati.com/if-it-becomes-difficult-to-save-family-space-we-make-a-new-base-in-kerala-pm-modi/", + "https://www.instagram.com/deshonnati/", + "https://deshonnati.com/nashiks-religious-unity-crack-prof-devyani-farande/", + "https://deshonnati.com/category/apale-sahar/vidharbha/", + "https://twitter.com/https://deshonnati.com/", + "https://deshonnati.com/category/farming/", + "https://deshonnati.com/category/apale-sahar/marathwada/%e0%a4%b2%e0%a4%be%e0%a4%a4%e0%a5%82%e0%a4%b0/", + "https://deshonnati.com/%e0%a4%b9%e0%a5%81%e0%a4%95%e0%a5%82%e0%a4%ae%e0%a4%b6%e0%a4%be%e0%a4%b9%e0%a5%80%e0%a4%9a%e0%a5%80-%e0%a4%9a%e0%a4%be%e0%a4%b9%e0%a5%82%e0%a4%b2/", + "https://deshonnati.com/loksabha-elections-modis-house-envy-from-the-union-finance-ministers-house/", + "https://facebook.com/https://www.facebook.com/Deshonnati/", + "https://deshonnati.com/leader-vilasrao-deshmukhs-wife-for-field-campaigning/", + "https://deshonnati.com/category/breaking-news/", + "https://www.youtube.com/channel/UCZC9A0_gBMEEYQ2ZOTXkwOw", + "https://deshonnati.com/parbhanis-jintur-selu-assembly-polls-will-ring-four-lakh/", + "https://deshonnati.com/gold-silver-price-gave-explosive-returns/", + "https://foxiz.themeruby.com/news/customize-interests/", + "https://deshonnati.com/%e0%a4%a8%e0%a4%bf%e0%a4%b8%e0%a4%b0%e0%a5%8d%e0%a4%97%e0%a4%aa%e0%a5%82%e0%a4%b0%e0%a4%95-%e0%a4%9c%e0%a5%80%e0%a4%b5%e0%a4%a8%e0%a4%b6%e0%a5%88%e0%a4%b2%e0%a5%80-%e0%a4%aa%e0%a4%b0%e0%a5%8d/", + "https://deshonnati.com/category/%e0%a4%b8%e0%a4%82%e0%a4%aa%e0%a4%be%e0%a4%a6%e0%a4%95%e0%a5%80%e0%a4%af/%e0%a4%b2%e0%a5%87%e0%a4%96/", + "https://deshonnati.com/category/krimjagat/", + "https://deshonnati.com/category/apale-sahar/vidharbha/gadchiroli/", + "https://deshonnati.com/galathon-management-of-an-underground-wire-cable-company/", + "https://deshonnati.com/category/%e0%a4%ac%e0%a4%bf%e0%a4%9d%e0%a4%a8%e0%a5%87%e0%a4%b8/%e0%a4%b6%e0%a5%87%e0%a4%85%e0%a4%b0%e0%a4%ac%e0%a4%be%e0%a4%9c%e0%a4%be%e0%a4%b0/", + "https://deshonnati.com/category/apale-sahar/mumbai-apale-sahar/", + "https://deshonnati.com/when-will-amarnath-yatra-start/", + "https://deshonnati.com/category/apale-sahar/vidharbha/bhandara/", + "https://deshonnati.com/category/apale-sahar/", + "https://deshonnati.com/chalkala-forced-beating-4-crimes-against-people-registered/", + "https://deshonnati.com/category/apale-sahar/%e0%a4%89%e0%a4%a4%e0%a5%8d%e0%a4%a4%e0%a5%8d%e0%a4%a4%e0%a4%b0-%e0%a4%ae%e0%a4%b9%e0%a4%be%e0%a4%b0%e0%a4%be%e0%a4%b7%e0%a5%8d%e0%a4%9f%e0%a5%8d%e0%a4%b0/", + "https://deshonnati.com/category/%e0%a4%b0%e0%a4%be%e0%a4%9c%e0%a4%95%e0%a4%be%e0%a4%b0%e0%a4%a3/", + "https://deshonnati.com/terms-conditions/", + "https://deshonnati.com/category/apale-sahar/marathwada/%e0%a4%9c%e0%a4%be%e0%a4%b2%e0%a4%a8%e0%a4%be/", + "https://deshonnati.com/category/%e0%a4%ac%e0%a4%bf%e0%a4%9d%e0%a4%a8%e0%a5%87%e0%a4%b8/%e0%a4%85%e0%a4%b0%e0%a5%8d%e0%a4%a5%e0%a4%95%e0%a4%be%e0%a4%b0%e0%a4%a3/", + "https://deshonnati.com/author/reporterngp/", + "https://deshonnati.com/category/apale-sahar/vidharbha/gondiya/", + "https://deshonnati.com/the-womans-life-was-saved-due-to-the-alertness-of-the-driver/", + "https://deshonnati.com/what-exactly-is-sextortion-instagram-has-created-a-tool-to-find-out/", + "https://deshonnati.com/category/health-news/", + "https://deshonnati.com/category/%e0%a4%ac%e0%a4%bf%e0%a4%9d%e0%a4%a8%e0%a5%87%e0%a4%b8/%e0%a4%b6%e0%a5%87%e0%a4%a4%e0%a5%80%e0%a4%ac%e0%a4%be%e0%a4%9c%e0%a4%be%e0%a4%b0%e0%a4%ad%e0%a4%be%e0%a4%b5/", + "https://deshonnati.com/author/webeditor/", + "https://deshonnati.com/rain-with-gales-again-big-crack-to-banana-plantations/", + "https://deshonnati.com/category/apale-sahar/marathwada/%e0%a4%9b%e0%a4%a4%e0%a5%8d%e0%a4%b0%e0%a4%aa%e0%a4%a4%e0%a5%80-%e0%a4%b8%e0%a4%82%e0%a4%ad%e0%a4%be%e0%a4%9c%e0%a5%80%e0%a4%a8%e0%a4%97%e0%a4%b0/", + "https://deshonnati.com/category/maharastra/", + "https://deshonnati.com/whatsapp-launches-meta-ai-chatbot/", + "https://deshonnati.com/who-is-the-richest-woman-in-india-find-out/", + "https://deshonnati.com/category/%e0%a4%b8%e0%a4%82%e0%a4%aa%e0%a4%be%e0%a4%a6%e0%a4%95%e0%a5%80%e0%a4%af/", + "https://deshonnati.com/category/%e0%a4%85%e0%a4%a7%e0%a5%8d%e0%a4%af%e0%a4%be%e0%a4%a4%e0%a5%8d%e0%a4%ae/", + "https://deshonnati.com/dr-babasaheb-ambedkar-jayanti-celebrated-with-great-enthusiasm/", + "https://deshonnati.com/delhi-capitals-legendary-player-out-of-ipl/", + "https://deshonnati.com/these-four-astronauts-will-go-into-space-for-the-gaganyaan-mission/", + "https://deshonnati.com/category/apale-sahar/vidharbha/yavatmal/", + "https://deshonnati.com/surya-tila-to-lord-shri-ram-in-ayodhya/", + "https://deshonnati.com/category/apale-sahar/vidharbha/nagpur/", + "https://deshonnati.com/verdict-was-pronounced-by-the-vasmat-sessions-court/", + "https://deshonnati.com/category/apale-sahar/marathwada/%e0%a4%b9%e0%a4%bf%e0%a4%82%e0%a4%97%e0%a5%8b%e0%a4%b2%e0%a5%80/", + "https://deshonnati.com/category/%e0%a4%a4%e0%a4%82%e0%a4%a4%e0%a5%8d%e0%a4%b0%e0%a4%9c%e0%a5%8d%e0%a4%9e%e0%a4%be%e0%a4%a8/", + "https://deshonnati.com/nt-3-tigress-out-of-control-of-forest-department/", + "https://deshonnati.com/farm-produce-will-be-stopped-due-to-election-commission/", + "https://deshonnati.com/category/%e0%a4%95%e0%a4%b0%e0%a5%80%e0%a4%85%e0%a4%b0/" + ] +} diff --git a/download/epaper_deshonnati.txt b/download/epaper_deshonnati.txt new file mode 100644 index 0000000..2dc56b4 --- /dev/null +++ b/download/epaper_deshonnati.txt @@ -0,0 +1,201 @@ +from flask import Flask, request, render_template, jsonify, make_response +import socket +from urllib.parse import urlparse +import urllib.parse as urlparse +import re +from bs4 import BeautifulSoup +import requests + +app = Flask(__name__) + +@app.route('/') +def index(): + return render_template('index.html') + +@app.route('/about') +def about(): + return render_template('about.html') + +@app.route('/login') +def login(): + return render_template('login.html') + +@app.route('/signup') +def signup(): + return render_template('run_script.html') + +@app.route('/createaccount') +def create_account(): + return render_template('createaccount.html') + +def find_xss(content): + # Regular expression pattern to find common XSS payloads + xss_patterns = [ + r'.*?', + r'on(load|click|mouseover|focus|blur|change|submit|error|resize)=.*?', + r'javascript:.*?' + ] + for pattern in xss_patterns: + if re.search(pattern, content, re.IGNORECASE): + return True + return False + +# def get_subdomains_and_urls(domain): +# subdomains = set() +# urls = set() +# try: +# # Get the homepage of the website +# response = requests.get(f"https://{domain}") +# if response.status_code == 200: +# # Parse the HTML content +# soup = BeautifulSoup(response.content, "html.parser") +# # Find all the links on the page +# for link in soup.find_all("a"): +# href = link.get("href") +# if href: +# # Extract the subdomain from the link +# subdomain = re.search(r"^https?://([^/]+)", href) +# if subdomain: +# subdomains.add(subdomain.group(1)) +# # Add the URL to the list +# urls.add(href) +# except requests.exceptions.RequestException as e: +# print(f"Error: {e}") +# return subdomains, urls + +# def get_subdomains_and_urls(domain): +# subdomains = set() +# urls = set() +# try: +# # Get the homepage of the website +# response = requests.get(f"https://{domain}") +# if response.status_code == 200: +# print("HTML Content:", response.text) # Debug print +# # Parse the HTML content +# soup = BeautifulSoup(response.content, "html.parser") +# # Find all the links on the page +# for link in soup.find_all("a"): +# href = "" # Initialize href with a default value +# href = link.get("href") +# if href: +# # Check if the URL is relative or absolute +# if urlparse(href).netloc: +# url = href +# else: +# # Construct absolute URL using the domain +# url = f"https://{domain}{href}" +# print("Found URL:", url) # Debug print +# # Extract the subdomain from the link +# subdomain = re.search(r"^https?://([^/]+)", url) +# if subdomain: +# subdomains.add(subdomain.group(1)) +# # Add the URL to the list +# urls.add(url) +# except requests.exceptions.RequestException as e: +# print(f"Error: {e}") +# print("Subdomains:", subdomains) # Debug print +# print("URLs:", urls) # Debug print +# return subdomains, urls +def extract_params(url): + parsed_url = urlparse(url) + params = urlparse.parse_qs(parsed_url.query) + return params + +def get_subdomains_and_urls(url): + subdomains = set() + urls = set() + try: + # Parse the URL to extract the domain + parsed_url = urlparse(url) + domain = parsed_url.netloc + # Extract the subdomain from the URL + subdomain = re.search(r"^https?://([^/]+)", url) + if subdomain: + subdomains.add(subdomain.group(1)) + # Extract URLs from query parameters + query_params = urlparse.parse_qs(parsed_url.query) + for param_name, param_value in query_params.items(): + if param_name == 'edn' or param_name == 'edid' or param_name == 'pid' or param_name == 'issueid': + urls.add(param_value[0]) + except Exception as e: + print(f"Error: {str(e)}") + return subdomains, urls + + + + +def get_ip_address_from_url(url): + try: + # Parse the URL to extract the domain + parsed_url = urlparse(url) + domain = parsed_url.netloc + # Get the IP address of the domain + ip_address = socket.gethostbyname(domain) + return ip_address + except Exception as e: + return f"Error: {str(e)}" + +# @app.route('/scan', methods=['POST']) +# def scan(): +# url = request.form['url'] +# ip_address = get_ip_address_from_url(url) +# subdomains, urls = get_subdomains_and_urls(urlparse(url).netloc) +# result = {'ip_address': ip_address, 'subdomains': list(subdomains), 'urls': list(urls)} +# text_content = jsonify(result).data.decode('utf-8') +# if find_xss(text_content): +# text_content += '\n\nXSS vulnerability detected!' +# parsed_url = urlparse(url) +# filename = parsed_url.netloc.replace('.', '_') + '.txt' +# response = make_response(text_content) +# response.headers['Content-Type'] = 'text/plain' +# response.headers['Content-Disposition'] = f'attachment; filename={filename}' +# return response + +def scan_url(url): + # Implement your scanning logic here + # For demonstration, let's just return a placeholder result + return {"url": url, "scan_result": "Placeholder scan result for URL: " + url} + +@app.route('/scan', methods=['POST']) +def scan(): + url = request.form['url'] + ip_address = get_ip_address_from_url(url) + subdomains, urls = get_subdomains_and_urls(urlparse(url).netloc) + params = extract_params(url) + + # Scan each parameter for XSS vulnerability + scanned_params = {} + for key, values in params.items(): + for value in values: + # Perform XSS scanning here (for demonstration, we'll just check for script tags) + if " + + + + \ No newline at end of file diff --git a/templates/api.txt b/templates/api.txt new file mode 100644 index 0000000..e8e73e8 --- /dev/null +++ b/templates/api.txt @@ -0,0 +1 @@ +ltDSyyey6cNp55W_nTJUUKg6vxCxsoTAXnoYBSHuxRY \ No newline at end of file diff --git a/templates/createaccount.html b/templates/createaccount.html new file mode 100644 index 0000000..fa47a84 --- /dev/null +++ b/templates/createaccount.html @@ -0,0 +1,102 @@ + + + + + + + CyberRakshak + + + + + +
+ +
+

Create Account

+
+ + + + + +
+

Have an account? Login Here

+
+ + + +
+
+

© 2024 Scan... | All Rights Reserved

+
+ + + \ No newline at end of file diff --git a/templates/help.html b/templates/help.html new file mode 100644 index 0000000..c106315 --- /dev/null +++ b/templates/help.html @@ -0,0 +1,61 @@ + + + + + + + Help + + + + + + + +
+ +
+
+
+

Contact Us

+

We'd love to hear from you! Send us a message and we'll get back to you as soon as possible.

+
+ + + + + + + +
+
+
+
+
+
+

© 2024 Scan... | All Rights Reserved

+
+ + + + diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..7264298 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,116 @@ + + + + + + + CyberRakshak + + + + +
+ +
+

+ Scan...
Your website to get started ! +

+

+ Real-time monitoring detects potential threats instantly. +

+ +
+ + +
+ + + +
+ + + + +
+
+ + +
+

© 2024 Scan... | All Rights Reserved

+
+ + + + + + \ No newline at end of file diff --git a/templates/login.html b/templates/login.html new file mode 100644 index 0000000..a68cc0b --- /dev/null +++ b/templates/login.html @@ -0,0 +1,97 @@ + + + + + + + CyberRakshak + + + + +
+ +
+

Login

+
+ + + + + +
+

Don't have an account? Create + Account

+
+ + + + +
+

© 2024 Scan... | All Rights Reserved

+
+
+ + + + \ No newline at end of file diff --git a/templates/login.js b/templates/login.js new file mode 100644 index 0000000..e3cf93d --- /dev/null +++ b/templates/login.js @@ -0,0 +1,59 @@ +const createAccountForm = document.getElementById("createAccountForm"); + +createAccountForm.addEventListener("submit", function (event) { + event.preventDefault(); + + const username = document.getElementById("username").value; + const password = document.getElementById("password").value; + + // Here you can add your own logic to create an account with the provided username and password + console.log(`Creating account for user ${username} with password ${password}`); +}); + +// --------------------------------------For database from Firebase------------------------------------------------------- + +// Import the functions you need from the SDKs you need +import { initializeApp } from "https://www.gstatic.com/firebasejs/10.10.0/firebase-app.js"; +import { getDatabase } from "https://www.gstatic.com/firebasejs/10.10.0/firebase-database.js"; + +import { getAuth, createUserWithEmailAndPassword } from "https://www.gstatic.com/firebasejs/10.10.0/firebase-database.js"; + +// TODO: Add SDKs for Firebase products that you want to use +// https://firebase.google.com/docs/web/setup#available-libraries + +// Your web app's Firebase configuration +const firebaseConfig = { + apiKey: "AIzaSyDeHSA_5dUKpphxSMHPBit6SFkcWCtPT6Q", + authDomain: "cyberrakshak.firebaseapp.com", + databaseURL: "https://cyberrakshak-default-rtdb.firebaseio.com", + projectId: "cyberrakshak", + storageBucket: "cyberrakshak.appspot.com", + messagingSenderId: "636838848826", + appId: "1:636838848826:web:ad2b4533e3b1a53f510803" +}; + +// Initialize Firebase +const app = initializeApp(firebaseConfig); +const database = getDatabase(app); +const auth = getAuth(); +login.addEventListener('click', e => { + + var email = document.getElementById('email').value; + var username = document.getElementById('username').value; + var password = document.getElementById('password').value; + + createUserWithEmailAndPassword(auth, email, password) + .then((userCredential) => { + // Signed up + const user = userCredential.user; + alert('Account created successfully!'); + // ... + }) + .catch((error) => { + const errorCode = error.code; + const errorMessage = error.message; + + alert('errorMessage'); + // .. + }); +}); \ No newline at end of file diff --git a/templates/result.html b/templates/result.html new file mode 100644 index 0000000..3626726 --- /dev/null +++ b/templates/result.html @@ -0,0 +1,115 @@ + + + + + + + + Download Result + + + + + +
+ + +

Download Page

+

Your scan result is ready to download. Click the link below to download the JSON file:

+

Download Scan Result

+ + + + + + + + + diff --git a/templates/script.js b/templates/script.js new file mode 100644 index 0000000..850bcb3 --- /dev/null +++ b/templates/script.js @@ -0,0 +1,134 @@ +const searchUrl = document.getElementById("search-url"); +const searchBox = document.getElementById("search-box"); +const searchResult = document.getElementById("search-result"); +// const searchForm = document.getElementById("search-form"); + +document + .getElementById("searchForm") + .addEventListener("submit", function (event) { + event.preventDefault(); // Prevent the default form submission + + var url = document.getElementById("url").value; + fetch("/scan", { + method: "POST", + body: JSON.stringify({ url: url }), // Send data as JSON string + headers: { + "Content-Type": "application/json", // Specify JSON content type + }, + }) + .then((response) => response.json()) + .then((data) => { + var resultDiv = document.getElementById("result"); + if (data.status === "success") { + resultDiv.innerText = data.message; + } else { + resultDiv.innerText = "Error: " + data.message; + } + }) + .catch((error) => { + console.error("Error:", error); + }); + }); +const options = { + method: "GET", + headers: { + accept: "application/json", + Authorization: "ltDSyyey6cNp55W_nTJUUKg6vxCxsoTAXnoYBSHuxRY", + }, +}; + +fetch("https://api.intruder.io/v1/health/", options) + .then((response) => response.json()) + .then((response) => console.log(response)) + .catch((err) => console.error(err)); + + + document.getElementById("searchForm").addEventListener("submit", function (event) { + event.preventDefault(); // Prevent the default form submission + + var url = document.getElementById("url").value; + showLoadingModal(); // Show loading modal when scan starts + fetch("/scan", { + method: "POST", + body: JSON.stringify({ url: url }), // Send data as JSON string + headers: { + "Content-Type": "application/json", // Specify JSON content type + }, + }) + .then((response) => response.json()) + .then((data) => { + var resultDiv = document.getElementById("scan-result"); + if (data.download_url) { + // Update download button href attribute + document.getElementById("downloadButton").href = data.download_url; + // Display download button + document.getElementById("downloadButton").style.display = "block"; + resultDiv.innerText = "Scan completed successfully."; + } else { + resultDiv.innerText = "Error: " + data.error; + } + hideLoadingModal(); // Hide loading modal when scan is complete + }) + .catch((error) => { + console.error("Error:", error); + hideLoadingModal(); // Hide loading modal if an error occurs + }); +}); + + +// ----------------------------------------For About Us------------------------------------------------ +document.addEventListener('DOMContentLoaded', function () { + var learnMoreBtn = document.getElementById('learn-more-btn'); + var learnMoreContent = document.getElementById('learn-more-content'); + + learnMoreBtn.addEventListener('click', function () { + if (learnMoreContent.style.display === 'none' || learnMoreContent.style.display === '') { + learnMoreContent.style.display = 'block'; + learnMoreBtn.textContent = 'Show Less'; + } else { + learnMoreContent.style.display = 'none'; + learnMoreBtn.textContent = 'Learn More'; + } + }); +}); + +// -----------------------------------------NavBar------------------------------------------------- +const navbarToggle = document.getElementById('navbarToggle'); +const navbarMenu = document.getElementById('navbarMenu'); + +navbarToggle.addEventListener('click', () => { + navbarMenu.classList.toggle('show'); +}); + + +// -----------------------------------------Download Button---------------------------------------------------- + +document.getElementById("searchForm").addEventListener("submit", function (event) { + event.preventDefault(); // Prevent the default form submission + + var url = document.getElementById("url").value; + fetch("/scan", { + method: "POST", + body: JSON.stringify({ url: url }), // Send data as JSON string + headers: { + "Content-Type": "application/json", // Specify JSON content type + }, + }) + .then((response) => response.json()) + .then((data) => { + var resultDiv = document.getElementById("scan-result"); + if (data.download_url) { + // Update download button href attribute + document.getElementById("downloadButton").href = data.download_url; + // Display download button + document.getElementById("downloadButton").style.display = "block"; + resultDiv.innerText = "Scan completed successfully."; + } else { + resultDiv.innerText = "Error: " + data.error; + } + }) + .catch((error) => { + console.error("Error:", error); + }); +}); + diff --git a/templates/signup.js b/templates/signup.js new file mode 100644 index 0000000..a32331d --- /dev/null +++ b/templates/signup.js @@ -0,0 +1,123 @@ +// const createAccountForm = document.getElementById("createAccountForm"); + +// createAccountForm.addEventListener("submit", function (event) { +// event.preventDefault(); + +// const username = document.getElementById("username").value; +// const password = document.getElementById("password").value; + +// // Here you can add your own logic to create an account with the provided username and password +// console.log(`Creating account for user ${username} with password ${password}`); +// }); + +// --------------------------------------For database from Firebase------------------------------------------------------- + +// Import the functions you need from the SDKs you need +// import { initializeApp } from "https://www.gstatic.com/firebasejs/10.10.0/firebase-app.js"; +// import { getDatabase } from "https://www.gstatic.com/firebasejs/10.10.0/firebase-database.js"; +// import { getAuth, createUserWithEmailAndPassword } from "https://www.gstatic.com/firebasejs/10.10.0/firebase-auth.js"; + +// import { getAuth, createUserWithEmailAndPassword } from "https://www.gstatic.com/firebasejs/10.10.0/firebase-database.js"; + +// // TODO: Add SDKs for Firebase products that you want to use +// // https://firebase.google.com/docs/web/setup#available-libraries + +// // Your web app's Firebase configuration +// const firebaseConfig = { +// apiKey: "AIzaSyDeHSA_5dUKpphxSMHPBit6SFkcWCtPT6Q", +// authDomain: "cyberrakshak.firebaseapp.com", +// databaseURL: "https://cyberrakshak-default-rtdb.firebaseio.com", +// projectId: "cyberrakshak", +// storageBucket: "cyberrakshak.appspot.com", +// messagingSenderId: "636838848826", +// appId: "1:636838848826:web:ad2b4533e3b1a53f510803" +// }; + +// // Initialize Firebase +// const app = initializeApp(firebaseConfig); + + + + +// //---------------------------submit button----------------------------- +// const submit = document.getElementById('submit'); +// submit.addEventListener("click", function (event) { +// event.preventDefault(); +// //-----------------------------input----------------------------------- +// const email = document.getElementById('email').value; +// const password = document.getElementById('password').value; +// const auth = getAuth(); +// createUserWithEmailAndPassword(auth, email, password) +// .then((userCredential) => { +// // Signed up +// const user = userCredential.user; +// alert("Account created successfully!"); +// window.location.href = "index.html" +// // ... +// }) +// .catch((error) => { +// const errorCode = error.code; +// const errorMessage = error.message; +// // .. +// alert(errorMessage); +// }); +// }) +// const database = getDatabase(app); +// const auth = getAuth(); +// login.addEventListener('click', e => { + +// var email = document.getElementById('email').value; +// var username = document.getElementById('username').value; +// var password = document.getElementById('password').value; + +// createUserWithEmailAndPassword(auth, email, password) +// .then((userCredential) => { +// // Signed up +// const user = userCredential.user; +// alert('Account created successfully!'); +// // ... +// }) +// .catch((error) => { +// const errorCode = error.code; +// const errorMessage = error.message; + +// alert('errorMessage'); +// // .. +// }); +// }); + + +// _____________________________________For data base------------------------------------- + +import { initializeApp } from "https://www.gstatic.com/firebasejs/10.10.0/firebase-app.js"; +import { getAuth, createUserWithEmailAndPassword } from "https://www.gstatic.com/firebasejs/10.10.0/firebase-auth.js"; + +const firebaseConfig = { + apiKey: "AIzaSyDeHSA_5dUKpphxSMHPBit6SFkcWCtPT6Q", + authDomain: "cyberrakshak.firebaseapp.com", + databaseURL: "https://cyberrakshak-default-rtdb.firebaseio.com", + projectId: "cyberrakshak", + storageBucket: "cyberrakshak.appspot.com", + messagingSenderId: "636838848826", + appId: "1:636838848826:web:ad2b4533e3b1a53f510803" +}; + +const app = initializeApp(firebaseConfig); + +const submit = document.getElementById('submit'); +submit.addEventListener("click", function (event) { + event.preventDefault(); + const email = document.getElementById('email').value; + const password = document.getElementById('password').value; + const auth = getAuth(); + createUserWithEmailAndPassword(auth, email, password) + .then((userCredential) => { + const user = userCredential.user; + alert("Account created successfully!"); + window.location.href = "index.html"; + }) + .catch((error) => { + const errorMessage = error.message; + alert(errorMessage); + }); +}); diff --git a/templates/stylee.css b/templates/stylee.css new file mode 100644 index 0000000..83ca619 --- /dev/null +++ b/templates/stylee.css @@ -0,0 +1,157 @@ +@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); + +* { + margin: 0; + padding: 0; + box-sizing: border-box; + font-family: 'Poppins', sans-serif; +} + +body { + width: 100%; + min-height: 100vh; + background-image: linear-gradient(rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.745)), url(images/bg.jpg); + background-position: center; + background-size: cover; + display: flex; + justify-content: center; + align-items: center; +} + +.container { + width: 400px; + min-height: 400px; + background: #ffffff25; + border-radius: 5px; + box-shadow: 0 0 5px rgba(0,0,0,.3); + padding: 40px 30px; +} + +.container .login-text { + color: #fffafa; + font-weight: 500; + font-size: 1.1rem; + text-align: center; + margin-bottom: 20px; + display: block; + text-transform: capitalize; +} + +.container .login-social { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(50%, 1fr)); + margin-bottom: 25px; +} + +.container .login-social a { + padding: 12px; + margin: 10px; + border-radius: 3px; + box-shadow: 0 0 5px rgba(0,0,0,.3); + text-decoration: none; + font-size: 1rem; + text-align: center; + color: #FFF; + transition: .3s; +} + +.container .login-social a i { + margin-right: 5px; +} + +.container .login-social a.facebook { + background: #4267B2; +} + +.container .login-social a.twitter { + background: #1DA1F2; +} + +.container .login-social a.google-plus { + background: #db4a39; +} + +.container .login-social a.linkedin { + background: #0e76a8; +} + +.container .login-social a.facebook:hover { + background: #3d5fa3; +} + +.container .login-social a.twitter:hover { + background: #1991db; +} + +.container .login-social a.google-plus:hover { + background: #ca4334; +} + +.container .login-social a.linkedin:hover { + background: #0b5c81; +} + +.container .login-email .input-group { + width: 100%; + height: 50px; + margin-bottom: 25px; +} + +.container .login-email .input-group input { + width: 100%; + height: 100%; + border: 2px solid #e7e7e7; + padding: 15px 20px; + font-size: 1rem; + border-radius: 30px; + background: transparent; + outline: none; + transition: .3s; + color: #fff; +} + +.container .login-email .input-group input:focus, .container .login-email .input-group input:valid { + border-color: #9bf2fea5; +} + +.container .login-email .input-group .btn { + display: block; + width: 100%; + padding: 15px 20px; + text-align: center; + border: none; + background: hsla(182, 100%, 48%, 0.208); + outline: none; + border-radius: 30px; + font-size: 1.2rem; + color: #FFF; + cursor: pointer; + transition: .3s; +} + +.container .login-email .input-group .btn:hover { + transform: translateY(-5px); + background: hsla(182, 100%, 48%, 0.364); +} + +.login-register-text { + color: #111; + font-weight: 600; +} + +.login-register-text a { + text-decoration: none; + color: #6c5ce7; +} + +@media (max-width: 430px) { + .container { + width: 300px; + } + .container .login-social { + display: block; + } + .container .login-social a { + display: block; + } +} \ No newline at end of file