From 12f3a0f18f3789d8b0d94b60cd52288e2665fe6a Mon Sep 17 00:00:00 2001 From: Sanjai kumar <119435129+sanjai-AK47@users.noreply.github.com> Date: Sat, 23 Mar 2024 11:16:17 +0530 Subject: [PATCH] Add files via upload --- __init__.py | 0 requirements.txt | 10 + setup.py | 39 ++ shodanx/__init__.py | 0 shodanx/__pycache__/__init__.cpython-311.pyc | Bin 0 -> 149 bytes shodanx/__pycache__/shodanx.cpython-311.pyc | Bin 0 -> 18386 bytes shodanx/modules/__init__.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 157 bytes shodanx/modules/banner/__init__.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 164 bytes .../banner/__pycache__/banner.cpython-311.pyc | Bin 0 -> 1409 bytes shodanx/modules/banner/banner.py | 47 ++ shodanx/modules/config/__init__.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 164 bytes .../config/__pycache__/config.cpython-311.pyc | Bin 0 -> 741 bytes shodanx/modules/config/config.py | 21 + shodanx/modules/core/__init__.py | 0 .../core/__pycache__/__init__.cpython-311.pyc | Bin 0 -> 162 bytes .../core/__pycache__/core.cpython-311.pyc | Bin 0 -> 13186 bytes shodanx/modules/core/core.py | 262 +++++++++++ shodanx/modules/help/__init__.py | 0 .../help/__pycache__/__init__.cpython-311.pyc | Bin 0 -> 162 bytes .../help/__pycache__/help.cpython-311.pyc | Bin 0 -> 13129 bytes shodanx/modules/help/help.py | 251 ++++++++++ shodanx/modules/update/__init__.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 164 bytes .../update/__pycache__/update.cpython-311.pyc | Bin 0 -> 5411 bytes shodanx/modules/update/update.py | 118 +++++ shodanx/modules/user/__init__.py | 0 .../user/__pycache__/__init__.cpython-311.pyc | Bin 0 -> 162 bytes .../user/__pycache__/user.cpython-311.pyc | Bin 0 -> 801 bytes shodanx/modules/user/user.py | 17 + shodanx/modules/verify/__init__.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 164 bytes .../verify/__pycache__/verify.cpython-311.pyc | Bin 0 -> 420 bytes shodanx/modules/verify/verify.py | 8 + shodanx/modules/version/__init__.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 165 bytes .../__pycache__/version.cpython-311.pyc | Bin 0 -> 2099 bytes shodanx/modules/version/version.py | 65 +++ shodanx/shodanx.py | 434 ++++++++++++++++++ 41 files changed, 1272 insertions(+) create mode 100644 __init__.py create mode 100644 requirements.txt create mode 100644 setup.py create mode 100644 shodanx/__init__.py create mode 100644 shodanx/__pycache__/__init__.cpython-311.pyc create mode 100644 shodanx/__pycache__/shodanx.cpython-311.pyc create mode 100644 shodanx/modules/__init__.py create mode 100644 shodanx/modules/__pycache__/__init__.cpython-311.pyc create mode 100644 shodanx/modules/banner/__init__.py create mode 100644 shodanx/modules/banner/__pycache__/__init__.cpython-311.pyc create mode 100644 shodanx/modules/banner/__pycache__/banner.cpython-311.pyc create mode 100644 shodanx/modules/banner/banner.py create mode 100644 shodanx/modules/config/__init__.py create mode 100644 shodanx/modules/config/__pycache__/__init__.cpython-311.pyc create mode 100644 shodanx/modules/config/__pycache__/config.cpython-311.pyc create mode 100644 shodanx/modules/config/config.py create mode 100644 shodanx/modules/core/__init__.py create mode 100644 shodanx/modules/core/__pycache__/__init__.cpython-311.pyc create mode 100644 shodanx/modules/core/__pycache__/core.cpython-311.pyc create mode 100644 shodanx/modules/core/core.py create mode 100644 shodanx/modules/help/__init__.py create mode 100644 shodanx/modules/help/__pycache__/__init__.cpython-311.pyc create mode 100644 shodanx/modules/help/__pycache__/help.cpython-311.pyc create mode 100644 shodanx/modules/help/help.py create mode 100644 shodanx/modules/update/__init__.py create mode 100644 shodanx/modules/update/__pycache__/__init__.cpython-311.pyc create mode 100644 shodanx/modules/update/__pycache__/update.cpython-311.pyc create mode 100644 shodanx/modules/update/update.py create mode 100644 shodanx/modules/user/__init__.py create mode 100644 shodanx/modules/user/__pycache__/__init__.cpython-311.pyc create mode 100644 shodanx/modules/user/__pycache__/user.cpython-311.pyc create mode 100644 shodanx/modules/user/user.py create mode 100644 shodanx/modules/verify/__init__.py create mode 100644 shodanx/modules/verify/__pycache__/__init__.cpython-311.pyc create mode 100644 shodanx/modules/verify/__pycache__/verify.cpython-311.pyc create mode 100644 shodanx/modules/verify/verify.py create mode 100644 shodanx/modules/version/__init__.py create mode 100644 shodanx/modules/version/__pycache__/__init__.cpython-311.pyc create mode 100644 shodanx/modules/version/__pycache__/version.cpython-311.pyc create mode 100644 shodanx/modules/version/version.py create mode 100644 shodanx/shodanx.py diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..32be03b --- /dev/null +++ b/requirements.txt @@ -0,0 +1,10 @@ +aiofiles>=23.2.1 +aiohttp>=3.9.3 +art>=6.1 +beautifulsoup4>=4.11.1 +click>=8.1.7 +colorama>=0.4.4 +fake_useragent>=1.2.1 +Requests>=2.31.0 +urllib3>=1.26.18 +lxml>=5.1.0 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..d6a8176 --- /dev/null +++ b/setup.py @@ -0,0 +1,39 @@ +from setuptools import setup, find_packages + +with open("README.md", "r") as fh: + long_description = fh.read() + +setup( + name='shodanx', + version='1.0.1', + author='D.Sanjai Kumar', + author_email='bughunterz0047@gmail.com', + description='ShodanX is a tool to gather information of targets using shodan dorks⚡.', + long_description=long_description, + long_description_content_type="text/markdown", + url="https://github.com/sanjai-AK47/ShodanX", + packages=find_packages(), + install_requires=[ + 'aiofiles>=23.2.1', + 'aiohttp>=3.9.1', + 'art>=6.1', + 'beautifulsoup4>=4.11.1', + 'colorama>=0.4.6', + 'click>=8.1.7', + 'requests>=2.31.0', + 'anyio>=4.2.0', + 'fake_useragent>=1.2.1', + 'lxml>=5.1.0', + 'urllib3>=1.26.18' + ], + entry_points={ + 'console_scripts': [ + 'shodanx = shodanx.shodanx:cli' + ] + }, + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + ], +) diff --git a/shodanx/__init__.py b/shodanx/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/shodanx/__pycache__/__init__.cpython-311.pyc b/shodanx/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0a708dd45a7b8fbcfbe018f1e75636aa3ad9b159 GIT binary patch literal 149 zcmZ3^%ge<81TM3_rh@3lAOZ#$p^VRLK*n^26oz01O-8?!3`I;p{%4TnFAe>S{M=Oi z;>5hH#7zC*jQo_uya@ebFkPV^AD@|*SrQ+wS5Wzj!zMRBr8Fniu80+=5oB~RKalvq P%*e?2fdNJoF$2W_7RDhV literal 0 HcmV?d00001 diff --git a/shodanx/__pycache__/shodanx.cpython-311.pyc b/shodanx/__pycache__/shodanx.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ae02f0749249e8f15920be2b0dbe0995bbf68052 GIT binary patch literal 18386 zcmeHOTWl1^ny&8Yndz~|_871+x1=HFV!#)$3547Z7aL3*l3+t%AQ{HfJ)Smmb9WEm zIm6N9EYg~lrS(cdLCRY4KEQgFWW@_oUXB!LPgZ$4>WKyk^^>JtYn3-g*+>x&tNs6~ z?(xjn;Tn>&*|dB9>iX;U*X^sns($}-U0n@<=i|u#DB*2{{0DlRr{4bf?mz1Y`H09w z=Hev51-S$t>7aaYgDTyU4PI|T~E-% z6Ga?_QrII4O6{mqIvH(n_@jZ+SEKWFiznn0__2p0G^Z7gUlwk05Dq^lT;WDnI=mJRN+mb3(H45nNx+32p%2b53~hdGJXk-$sQW-Bj|u0KV3e zZ?n>@tW`FQxPn`t7QWG~PKdIlvKGN@5Z)%cWzPuzskbU@yN}4C?2GRhLboQqGtnMw zPjm!3pm&hpN%^($uEeh3F3R)AcPF}o-SoRI-jmo9+(W~gm<-f|^=y8f06%7Pzzs^V;rpHq&0`uqdqNb*MI zsJ!XZ7j6lV6a1FVsa4+m(44l&TjiFANV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ules/__pycache__/__init__.cpython-311.pyc b/shodanx/modules/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d307553db686e4397f39f92a9d7e38cc0b69b08c GIT binary patch literal 157 zcmZ3^%ge<81a`B&rh@3lAOZ#$p^VRLK*n^26oz01O-8?!3`I;p{%4TnF9ZFI{M=Oi z;>5hH#7zC*jQo_uya@ebFkPXao1apelUl4FAD@|*SrQ+wS5Wzj!v-R1SHuc50Axim TKalvq%*e?2fdNJoF$2W_cSR&i literal 0 HcmV?d00001 diff --git a/shodanx/modules/banner/__init__.py b/shodanx/modules/banner/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/shodanx/modules/banner/__pycache__/__init__.cpython-311.pyc b/shodanx/modules/banner/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..893ce1d08c8a55cd0b0d326948933af2b1667d5f GIT binary patch literal 164 zcmZ3^%ge<81nE=0q=M+jAOZ#$p^VRLK*n^26oz01O-8?!3`I;p{%4TnFLV8j{M=Oi z;>5hH#7zC*jQo_uya@ebFkPXao1apelUl5wl$e*7TBIKzpP83g5+AQuQ2C3)1|n%! a#0oSAWK%IekodsN$jJDC0Y(%t1H}N*SSJ|( literal 0 HcmV?d00001 diff --git a/shodanx/modules/banner/__pycache__/banner.cpython-311.pyc b/shodanx/modules/banner/__pycache__/banner.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..748979df497541132946257ba9850429abbc85b9 GIT binary patch literal 1409 zcmZ`&&1)M+6ra_8XeDbc$5C8=$i)E{qS8iC(t}G|sw8X2R91_mB+U{qEA3bx-H$N4 zN-QJ69(?FQ2OmOfND8Hgw59z!dX~Y5Fc1)w9C{O&UVJEdvnwqQrEh27o8No$=HoYS zeo>Sp0(t)YAAFfd=r0DQ0yvPff5H5K3}kR7vN(;iVp`1NHJ)R>m?>15lYJjcfCOE=MSX`Sz6vEdY8a zLW?+o6+GAAwWS!sVtaWS!AmbVgnoxV6m7*24w05M_zKF2e=}!}r^2Q~Fcog<^>3+I z@wz6?ag=+%RG(x8CJvghclJFfV2tg>t~;jVy1EJDE!Wg-a5ad&x7YGoR16$Ifw1S;-oZ+84J1&k z^OhWZSm=07hpc_FcKdoox7&K_%Z{a!wJ&aUYnYVrW5@I=xZWW!F?P?nWKNB#=|v!SwaqHLTh8~)~KesPRq zvk$pYzg}1#iwwTbUJW}F|JQdf!qDk&j#DT#@9&(!>L|Aw-W1V+Q&xP09g(myqC5~r z*z=%#S-nkpf`PfMvZ|J-2v?468s8~wsikUx#x1>pZBM7dtp|k?73y8xhH@|7RjFvT z_90QInH{K-2WqkS)qN^;v1vlJi1+VoS5?B^8BLVcidx+*6pLh$Vd-Xhd+Sb>EChg+ z6LCp~fmC?CyMZsD^EX7^g$P*%buNDz^8Y!x0g$~G_fJq`p5wR?S|9#@dxn2soXA;-O`Hj3u;NS81X&rR uSuAzfgM^v6qxEB9m{^4Y>Fjrp2mRxFC+YRm^tzuKOS9bk82wiT=X?X&;bap4 literal 0 HcmV?d00001 diff --git a/shodanx/modules/banner/banner.py b/shodanx/modules/banner/banner.py new file mode 100644 index 0000000..647713a --- /dev/null +++ b/shodanx/modules/banner/banner.py @@ -0,0 +1,47 @@ +#!/usr/bin/env python3 +from colorama import Fore,Back,Style +from art import * +import random +import random + + +red = Fore.RED + +green = Fore.GREEN + +magenta = Fore.MAGENTA + +cyan = Fore.CYAN + +mixed = Fore.RED + Fore.BLUE + +blue = Fore.BLUE + +yellow = Fore.YELLOW + +white = Fore.WHITE + +reset = Style.RESET_ALL + +bold = Style.BRIGHT + +colors = [ green, cyan, blue] + +random_color = random.choice(colors) + + +def banner(): + + tool_name = "shodanX" + + fonts = ["big", "ogre", "shadow", "script", "colossal" , "smslant", "graffiti", "slant"] + selected_font = random.choice(fonts) + banner = text2art(f"{tool_name}", font=selected_font) + + banner = f"""{banner} + + {bold}{white}Author : D.SanjaiKumar @CyberRevoltSecurities{reset}\n""" + + + + return banner diff --git a/shodanx/modules/config/__init__.py b/shodanx/modules/config/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/shodanx/modules/config/__pycache__/__init__.cpython-311.pyc b/shodanx/modules/config/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4f322aaf81bc8a1c103ddec914a83c13ae166fd7 GIT binary patch literal 164 zcmZ3^%ge<81jjG_O$E`9K?DpiLK&agfQ;!3DGb33nv8xc8H$*I{LdiCU*`H5`MIh3 z#ff=YiJAJr8Tl!Rc@g@>V7fv-H$SB`C$(5VIX^EgGhIJEJ~J<~BtBlRpz;@o4Mfte bh!toK$fja`An}2jk&*EO1B@tQ28sayHgPAv literal 0 HcmV?d00001 diff --git a/shodanx/modules/config/__pycache__/config.cpython-311.pyc b/shodanx/modules/config/__pycache__/config.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b93fdab192fef862767f77fbbe51c39f518346b6 GIT binary patch literal 741 zcmZWmJ8Roe6h8OLQtU*JxHxnv*rhSSOVp)XDR{_K$l|5(5`?AHa$`&AD%cINF(HE~ zfsP53LZ_6HUy(mhV(<_&8H$H)0xu!7&~x>$OZy$^JLjI~J>0K~vI+?2*Kccw0Q}&G z6f`mBPtdpk6HIal^;nZSG3go9sYz;35q|R2-9}OnsSL7!|NJ}B1?0fT{wZ1u`wCsx zsT=xm0-tcsXWAz|?~tIyJ4N{NmpAnRoRBN*c)jS#3ck3Ewifokc?2tK@ChB&%mLp9R^r@y?2pb346;<@&bMsR)6E8M<*~XoQMX3IwD9;g z|1|za(oD;rcRvn33@#7GT6v7R!4d%$;sYnmmm+@||ygVNH fyRzp5hH#7zC*jQo_uya@ebFkPXao1apelUl5woL`ixA0MBYmst`YuUAm{i^B#YWmm)s YGzDZ&F+Y&_z|6?V_<;dN6fpzE0AQjfF#rGn literal 0 HcmV?d00001 diff --git a/shodanx/modules/core/__pycache__/core.cpython-311.pyc b/shodanx/modules/core/__pycache__/core.cpython-311.pyc new file mode 100644 index 0000000000000000000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D&6C2FK^7cYv7r# z^!P4SUvL@`7*CF=x_@5$zk#sNdkCoq35V0BncyKZYul+ H>hOO7U$n@( literal 0 HcmV?d00001 diff --git a/shodanx/modules/core/core.py b/shodanx/modules/core/core.py new file mode 100644 index 0000000..cb0e075 --- /dev/null +++ b/shodanx/modules/core/core.py @@ -0,0 +1,262 @@ +import aiohttp +import asyncio +import aiofiles +from colorama import Fore, Style, Back +from bs4 import XMLParsedAsHTMLWarning, MarkupResemblesLocatorWarning, BeautifulSoup +from requests.packages.urllib3.exceptions import InsecureRequestWarning +import urllib.parse as encoder +from fake_useragent import UserAgent +import warnings +import os + +red = Fore.RED + +green = Fore.GREEN + +magenta = Fore.MAGENTA + +cyan = Fore.CYAN + +mixed = Fore.RED + Fore.BLUE + +blue = Fore.BLUE + +yellow = Fore.YELLOW + +white = Fore.WHITE + +lm = Fore.LIGHTMAGENTA_EX + +reset = Style.RESET_ALL + +bold = Style.BRIGHT + + +async def save(url, output): + + try: + + + if output: + + + + if os.path.isfile(output): + + filename = output + + elif os.path.isdir(output): + + filename = os.path.join(output, f"ShodanX_results.txt") + + else: + + filename = output + + else: + + + filename = "shodanX_results.txt" + + + async with aiofiles.open(filename, "a") as w: + + await w.write(url + '\n') + + except KeyboardInterrupt as e: + + + print(f"\n[{bold}{blue}INFO{reset}]: {bold}{white}ShodanX exits{reset}") + + quit() + + except asyncio.CancelledError as e: + + + SystemExit + +async def core_request(query, facet, agents, timeout, redirects, username, output): + + try: + + total = [] + + encoded = encoder.quote(query) + + url = f"https://www.shodan.io/search/facet?query={encoded}&facet={facet}" + + if agents: + + agent = UserAgent().random + + else: + + agent = "ShodanX+https://github.com/sanjai-AK47/ShodanX" + + headers = {'User-Agent': agent} + + redirect = True if redirects else False + + + async with aiohttp.ClientSession() as session: + + async with session.get(url, ssl=False, timeout=timeout, allow_redirects=redirect, headers=headers) as response: + + responsed = await response.text() + + + with warnings.catch_warnings(): + + + warnings.filterwarnings("ignore", category=UserWarning) + + warnings.filterwarnings('ignore', category=XMLParsedAsHTMLWarning) + + warnings.filterwarnings("ignore", category=MarkupResemblesLocatorWarning) + + soup = BeautifulSoup(responsed, "lxml") + + + + results = soup.find_all('strong') + + for result in results: + + total.append(result.get_text()) + + if len(total) == 0: + + print(f"[{bold}{red}ALERT{reset}]: {bold}{white}Sorry {username} There is no data available for your queries and facet in shodan{reset}") + + quit() + + + print(f"""[{bold}{blue}INFO{reset}]: {bold}{white}Results Found for your query and facet: {query} & facet:"{facet}"{reset}""") + + + for result in total: + + + print(f"[{bold}{blue}INFO{reset}]: {bold}{white}{result}{reset}") + + await save(result, output) + + print(f"[{bold}{blue}INFO{reset}]: {bold}{white}Total Results Found: {len(total)}{reset}") + + + except KeyboardInterrupt as e: + + print(f"[{blue}INFO{reset}]: {bold}{white}ShodanX exits..{reset}") + + SystemExit + + except aiohttp.ClientConnectionError as e: + + print(f"[{bold}{red}INFO{reset}]: {bold}{white}Client Connection Exceeds for: {url} , {username} please try again your query{reset}") + + except asyncio.TimeoutError as e: + + print(f"[{bold}{red}INFO{reset}]: {bold}{white}Client Timeout Exceeds for: {url}, {username} please try again your query{reset}") + + except asyncio.CancelledError as e: + + SystemExit + + except Exception as e: + + pass + + +async def enum_request(query, agents, timeout, redirects, username, output): + + try: + + total = [] + + url = f"https://www.shodan.io/domain/{query}" + + if agents: + + agent = UserAgent().random + + else: + + agent = "ShodanX+https://github.com/sanjai-AK47/ShodanX" + + headers = {'User-Agent': agent} + + redirect = True if redirects else False + + + async with aiohttp.ClientSession() as session: + + async with session.get(url, ssl=False, timeout=timeout, allow_redirects=redirect, headers=headers) as response: + + responsed = await response.text() + + if response.status != 200: + + print(f"[{bold}{red}ALERT{reset}]: {bold}{white}Sorry {username} unable to fetch subdomains for {query} because of bad response from shodan: {response.status}{reset}") + + quit() + + + with warnings.catch_warnings(): + + + warnings.filterwarnings("ignore", category=UserWarning) + + warnings.filterwarnings('ignore', category=XMLParsedAsHTMLWarning) + + warnings.filterwarnings("ignore", category=MarkupResemblesLocatorWarning) + + soup = BeautifulSoup(responsed, "lxml") + + ul = soup.find('ul', id='subdomains') + + if ul: + + subdomains = ul.findAll("li") + + for result in subdomains: + + subdomain = result.text.strip() + f".{query}" + + print(f"[{bold}{blue}INFO{reset}]: {bold}{white}{subdomain}{reset}") + + await save(subdomain, output) + + print(f"[{bold}{blue}INFO{reset}]: {bold}{white}Total Subdomains found for {query}: {len(subdomains)}{reset}") + + else: + + print(f"[{bold}{red}ALERT{reset}]: {bold}{white}Sorry {username} unable to fetch subdomains for {query} because of bad response from shodan{reset}") + + + + except KeyboardInterrupt as e: + + print(f"[{blue}INFO{reset}]: {bold}{white}ShodanX exits..{reset}") + + SystemExit + + except aiohttp.ClientConnectionError as e: + + print(f"[{bold}{red}INFO{reset}]: {bold}{white}Client Connection Exceeds for: {url} , {username} please try again for subdomain enumeration{reset}") + + except asyncio.TimeoutError as e: + + print(f"[{bold}{red}INFO{reset}]: {bold}{white}Client Timeout Exceeds for: {url}, {username} please try again for subdomain enumeration{reset}") + + except asyncio.CancelledError as e: + + SystemExit + + except Exception as e: + + print(e) + + + + + \ No newline at end of file diff --git a/shodanx/modules/help/__init__.py b/shodanx/modules/help/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/shodanx/modules/help/__pycache__/__init__.cpython-311.pyc b/shodanx/modules/help/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5152f9fa908305aba8f3a2ea6ff408d7fe741feb GIT binary patch literal 162 zcmZ3^%ge<81hSo9QbF`%5CH>>P{wCAAY(d13PUi1CZpd)=dU}j`w{J;PsikN|706dK)^#A|> literal 0 HcmV?d00001 diff --git a/shodanx/modules/help/__pycache__/help.cpython-311.pyc b/shodanx/modules/help/__pycache__/help.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1977ea2acc31cd287fe61889c15e071e05ea5c81 GIT binary patch literal 13129 zcmeHNTW=gm74G&-&&6XqS+6&jjg#%Qy<{!Ywm=aQCa^g1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+gk@>$k%KU-ixLP2BK{1I27=%K+siyNToP^Kjz#)}8;f-)@C*m41P{Y$cq_DvPntWpuA@(v1|%?xdHH&qD@?Os#WJM@6teVOJikyk)gOVLopzw{g~ip z3>|>PPot|%42Z{|4YScDIVW*c4-R+IGpVV0i2>F^dNNg#z07y;5@P_f|eIRWXn&vt+mdJ}f#t(VV-O#fh&HiE4W#L%eMf+hnAI)s6fx~jiRRws1B zy{&_ItVF0cX1gxu(Na8 z2P49bz~@Pr?7vLFXFm_~@rhwRJevv<80Jd?!+d07m@k<#?}r2r^FhYLe4)j|{0NC* zexQe8z7z}vVg9gSuv$D)`Z3Ih1V{+;-|d9?`wa8@1$?q|@FZFm+Hg>S6yWst2}p&F z%Kh$~e(Sp(j}&_I)d={HNk|PY=PU#lwUXF6)DE@=CA5#Of&O0j$~FKDBRE}`TL94w z0Dkb!Zw-YAD*{`-7f`ybR~*;Feb$K~=~oVQ_5kpHU1twKAo`2h1As9aLENtbJlubN zh&wgiLEM)Yaq(V5Z0qg&bcvq3v@InB;IwXM>My}M8FVRZ@ zJi{(XYv8rV@ZKYv3jncuU4E3-Fhh(ms=?tuzjVn93@Q@2pty?1-tmi>>xD=`Ezc_s z2E|0?lL1})&%}J{DfBT92A>!d!n3I$fkB}pFepSO28EJ&W-=srPzW*}6bdaK6h=r4 z3Ijb13Z>wXa#6jcHV+F1tHmRwM?3HY6Ckw%a9e2GwVT;d-OrVrszc41Nnrt2C|-J@ z8YF&dzBuKl;H=%(F3cB;v%XfQgw*})rO6A$*(;NNw#M!bn11@)hm*5@y0m7(#j>+A zSBt(@vsa15&e;9ThsBwhxexrz8o`5kU;E(V^p#?8>Ykr3E)=ian4FnmNAZ5tCCG0a WLS>nJJ+6EvPM$u9%G(omzu|vDuHU!- literal 0 HcmV?d00001 diff --git a/shodanx/modules/help/help.py b/shodanx/modules/help/help.py new file mode 100644 index 0000000..a44186a --- /dev/null +++ b/shodanx/modules/help/help.py @@ -0,0 +1,251 @@ +from colorama import Fore,Back,Style + + +red = Fore.RED + +green = Fore.GREEN + +magenta = Fore.MAGENTA + +cyan = Fore.CYAN + +mixed = Fore.RED + Fore.BLUE + +blue = Fore.BLUE + +yellow = Fore.YELLOW + +white = Fore.WHITE + +reset = Style.RESET_ALL + +bold = Style.BRIGHT + +colors = [ green, cyan, blue] + + +def mode_help(): + + print(f""" +[{bold}{blue}DESCRIPTION{reset}]: {bold}{white}ShodanX is a tool to gather information of targets using shodan dorks{reset}⚡. + +[{bold}{blue}MODES{reset}]: {bold}{white} + + + - org : Org mode to search the data of an organization with different types of facet in shodan + - domain : Domain mode to search the data of a domain with different types of facet in shodan + - subdomain : Subdomain mode to search the subdomain of the domain from shodan database + - cidr : CIDR mode to search data using the CIDR search query with different types of facet in shodan + - ssl : SSL modoe to search data using the ssl search query with different types of facet in shodan + - custom : Custom search mode to search with custom search with different types of facet shodan + - update : Update the ShodanX to latest version + +[{bold}{blue}FLAGS{reset}]: {bold}{white} + + -h, --help : Shows this help message and exits. + +[{bold}{blue}Usage{reset}]: {bold}{white} + + shodanx [commands] + + Available Commands: + + - org : Executes the shodanX org mode for information gathering + - domain : Executes the shodanX domain mode for information gathering + - subdomain : Executes the shodanX subdomain enumeration query mode for information gathering + - cidr : Executes the cidr query mode forinformation gathering + - ssl : Executes the shodanX ssl query mode for information gathering + - custom : Executes the shodanX Custom search query mode for information gathering + - update : Update the ShodanX to latest version + + Help Commands: + + - org : shodanx org -h + - domain : shodanx domain -h + - subdomain : shodanx subdomain -h + - cidr : shodanx cidr -h + - ssl : shodanx ssl -h + - custom : shodanx custom -h + - update : shodanx update -h{reset} +""") + + quit() + +def org_mode_help(): + + print(f""" +[{bold}{blue}MODE{reset}]: {bold}{white}ShodanX Organization Mode!{reset} + +[{bold}{blue}Usage{reset}]: {bold}{white} + + shodanx org [options] + + Options for org mode: + + -org, --organization : Specify a organization name for shodanX query. + + -fct, --facet : Specify a Facet type for shodanx query and refer the shodan facet types for this queries. + + -o, --output : Specify a filename to save the results of your facet queries. + + -ra, --random-agent : Enable it to use a random user agents when making shodan's facet queries. + + -to, --timeout : Specify a value for connection timeout + + -r, --redirect : Enable it to follow the redirect{reset} + """) + + exit() + +def dom_mode_help(): + + print(f""" +[{bold}{blue}MODE{reset}]: {bold}{white}ShodanX Domain Mode!{reset} + +[{bold}{blue}Usage{reset}]: {bold}{white} + + shodanx domain [options] + + Options for domain mode: + + -d, --domain : Specify a domain name for shodanX query. + + -fct, --facet : Specify a Facet type for shodanx query and refer the shodan facet types for this queries. + + -o, --output : Specify a filename to save the results of your facet queries. + + -ra, --random-agent : Enable it to use a random user agents when making shodan's facet queries. + + -to, --timeout : Specify a value for connection timeout + + -r, --redirect : Enable it to follow the redirect{reset} + """) + + exit() + +def ssl_mode_help(): + + print(f""" +[{bold}{blue}MODE{reset}]: {bold}{white}ShodanX SSL Mode!{reset} + +[{bold}{blue}Usage{reset}]: {bold}{white} + + shodanx ssl [options] + + Options for SSL mode: + + -sq, --ssl-query : Specify a ssl query for shodanx (ex: -sq ssl.cert.issuer.cn:tesla.com). + + -fct, --facet : Specify a Facet type for shodanx query and refer the shodan facet types for this queries. + + -o, --output : Specify a filename to save the results of your facet queries. + + -ra, --random-agent : Enable it to use a random user agents when making shodan's facet queries. + + -to, --timeout : Specify a value for connection timeout + + -r, --redirect : Enable it to follow the redirect{reset} + """) + + exit() + + +def subs_mode_help(): + + print(f""" +[{bold}{blue}MODE{reset}]: {bold}{white}ShodanX Subdomain Enumeration Mode!{reset} + +[{bold}{blue}Usage{reset}]: {bold}{white} + + shodanx subdomain [options] + + Options for subdomain mode: + + -d, --domain : Specify a domain name for shodanX for subdomain enumeration and not enumerate for subs of subdomains. (ex:tesla.com, google.com, facebook.com) + + -o, --output : Specify a filename to save the results of your facet queries. + + -ra, --random-agent : Enable it to use a random user agents when making shodan's facet queries. + + -to, --timeout : Specify a value for connection timeout + + -r, --redirect : Enable it to follow the redirect{reset} + """) + + exit() + + +def cidr_mode_help(): + + print(f""" +[{bold}{blue}MODE{reset}]: {bold}{white}ShodanX CIDR Mode!{reset} + +[{bold}{blue}Usage{reset}]: {bold}{white} + + shodanx cidr [options] + + Options for cidr mode: + + -c, --cidr : Specify a cidr/subnet for shodanX query. + + -fct, --facet : Specify a Facet type for shodanx query and refer the shodan facet types for this queries. + + -o, --output : Specify a filename to save the results of your facet queries. + + -ra, --random-agent : Enable it to use a random user agents when making shodan's facet queries. + + -to, --timeout : Specify a value for connection timeout + + -r, --redirect : Enable it to follow the redirect{reset} + """) + + exit() + + + + + +def cus_mode_help(): + + print(f""" +[{bold}{blue}MODE{reset}]: {bold}{white}ShodanX Custom Search Mode!{reset} + +[{bold}{blue}Usage{reset}]: {bold}{white} + + shodanx custom [options] + + Options for custom mode: + + -cq, --custom-query : Specify a custom search for shodan queries (ex: -cq hostname:"tesla.com"). + + -fct, --facet : Specify a Facet type for shodanx query and refer the shodan facet types for this queries. + + -o, --output : Specify a filename to save the results of your facet queries. + + -ra, --random-agent : Enable it to use a random user agents when making shodan's facet queries. + + -to, --timeout : Specify a value for connection timeout + + -r, --redirect : Enable it to follow the redirect{reset} + """) + + exit() + +def update_mode_help(): + + print(f""" +[{bold}{blue}MODE{reset}]: {bold}{white}ShodanX Update mode{reset} + +[{bold}{blue}Usage{reset}]: {bold}{white} + + shodanx update [options] + + Options for update mode: + + -h, --help : Shows this help message and exits + + -lt, --latest : updates the shodax to latest version{reset} + """) + + exit() + diff --git a/shodanx/modules/update/__init__.py b/shodanx/modules/update/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/shodanx/modules/update/__pycache__/__init__.cpython-311.pyc b/shodanx/modules/update/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..30e2213931e1cdd60dc6a31e9e7903c786b4e53e GIT binary patch literal 164 zcmZ3^%ge<81V6U@O$E`9K?DpiLK&agfQ;!3DGb33nv8xc8H$*I{LdiCU*`H5`MIh3 z#ff=YiJAJr8Tl!Rc@g@>V7fv-H$SB`C$(6=v>+w1Bvn5?J~J<~BtBlRpz;@o4Mfte bh!toK$fja`An}2jk&*EO1B@tQ28sayM;a&M literal 0 HcmV?d00001 diff --git a/shodanx/modules/update/__pycache__/update.cpython-311.pyc b/shodanx/modules/update/__pycache__/update.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d1da1f55fbab32ae30c3b0151f39dfd4fef36cc6 GIT binary patch literal 5411 zcmd5=U2GHC6~6Q5e~DHuy@Aio^$TGckVqi_k8#GcYeQzK>5YL{w@8}Psl$|C>7RZUVH}3O(GJJNs@l7 z*(8%<``HxN&oPFc@8|V)p#_14K z8U<<`pM&3vUeMkoZdlJGqgGgqT6~TX*$3QR@WB0&7sw==V@EAX{?}Q`AKhe=dh2*-siUOF0Aan zwK|5Vq4M+X^ThXgl58RB#8&0Sr*}=9UITfW+MpmLqJUtpuw08b%_ulBq5m}6<&p=C3iYt;5O~zG8QJhrHb*1Qvm%wRm39LUn-3iF93boO+g=v(2=eGp#Zk4fX>(M-HsdsDMyLBE^-D4&LaP>6krO47KNd?Jr%#zhRk>&>8k~(Wq}9Hfn?3 zkt(H!ydgcbX&=>9+Ps7q!=7dOaZlSlC|tZFZ8+aTUQpFoMA}L%UTcJi#omwXN`{Z*AK~hplbj>aJDR z_Kok(G5XfF^;u(U2TM;UB*#M!uRV;tPbP&NH(L>a%J%k95F_W_o^<3Kv?eFaR?NI? zpL47ZEZ6HHtm>EjsSHVbw~%(C@MEkIG8l4}FmS;ez;|bsG9-vT(U0>V=0sL~tJF@& zD8Q6a*493#x(nOtK5i|&K(PBsiHF|!{`HdMSI^xHd|}f7DhPaMC!KG6qdzTMgRiUq zhc_Cq_gUkOzFU5V{SBcHArw15b(%pLxN=bbG0%HVUwbE=Z(2_z*!vt&sqYJx;z&_%IPbNv|bJDQ-iGUsEJR1IXjPqZ^RmBxwy00E%Q* zqWFE&I$f4CQd;u?R8WAGv?>9Z2xAnX!=q#eGgKau6o4O^O>53r_vzkKJv|yLE1H8! zDfyB_>v1UD4HS2CIuAgIqUJPQG^X)@ka7ABv?}O3L>(-& z5$!#QBL)c5eV}MYv%kan2BD-`@Ixrx*kItuSA0Hnun+>II0#7cR((G7o^ji7rQqGV z(n*2U~P99b2s31W-}avRK#nTmP^9vtprcd$DeN zzHa-gWjC4$FoHgePQJqdzeiHmt;HeCtYsDO_-mH}^)pqo!tD5$XTEIBH-7jv|LoL2 z@zn6M%mg6YMdmO;X3)4o6NgC-7VaFsI#iOnR~LChn6SJ0;ry}bOu5AYlr9PM(%Ib0?;8V zJAfxy2MrOlX12kubJ$=-R^%S=cUK=a@GLL9cGz&3na8)40Y1lzPCMk9KyLvd%*iTt z7_kApU>Q{~|0kfgpc{bLIwpxO9p=#kZu<%Vx+@Mdqt=mSUFgQZYZeo_D~=YB6=4iE z3*=cCOD#$Csu)VkvTv0&hR$-UUq6gh+54;k-J45&2(kP8&CqSaqkTO;1dr9d6Q@f# z7>$paIT)rNCe-NZ*jkBLDxOG3P5bDWOfQ^I%44N`BPkD4JmvJ!EkGyyX8r+cNI?v= z-3kqwGc&G^$mv}XhDJcvA=p64G6H`R&ZgsoNeOeY^O8C=Qp(6+G$pLaVH1uoC6t63 z9+9XNZf!jj##KRLS&>w(v5H7=H4eApG}@3vk?cUyj${{--AHsiMK|ksZ6K=!*Cxhl z4)EXk#IO#t2H@%_%O}#1YVL*3n$z^~dI0M-Qa5yE2iW()Px%(|am3d~!M{*7T#>5T zA$CJuzPj1CukrTO4FGalycH`1Hy4AO5u&2AA1^jGf77`8Y2)rf)~16$^0l9v&Lz0|Kb#YtU%E-V=**^Vwxjs z#UXkebol?1au3Kd$1uzSsh-lW1rpA$buW-$zH~1T_mqAukfyx-UUYb`Ca3rXr}yf( sQC*(m7F@pTo+)9$<-cA%B`iB?82A&xB0D1}TBM)ZjPmP*9)rpL2YsHoo&W#< literal 0 HcmV?d00001 diff --git a/shodanx/modules/update/update.py b/shodanx/modules/update/update.py new file mode 100644 index 0000000..3805676 --- /dev/null +++ b/shodanx/modules/update/update.py @@ -0,0 +1,118 @@ +import requests +from colorama import Fore, Style +import subprocess +import os +from alive_progress import alive_bar + +bold =Style.BRIGHT +blue = Fore.BLUE +red = Fore.RED +white = Fore.WHITE +reset = Style.RESET_ALL + + +def get_zip(username): #fetching the latest zip file to update + + try: + + url = "https://api.github.com/repos/sanjai-AK47/ShodanX/releases/latest" + + response = requests.get(url, timeout=10) + + if response.status_code == 200: + + return response.json()['zipball_url'] + + else: + + print(f"[{bold}{red}ALERT{reset}]: {bold}{white}Hey {username} Update Failed for Shodanx, Please try to update the ShodanX manually{reset}") + + quit() + + + except Exception as e: + + pass + + + +def get_latest(url, username, path): #updating our shodanX to its latest version then called the verify for version + + try: + + + response = requests.get(url, timeout=20, stream=True) + + filepath = f"{path}/shodanX.zip" + + if response.status_code == 200: + + print(f"[{bold}{blue}INFO{reset}]: {bold}{white}Hey {username}, Updating ShodanX please wait..{reset}") + + with open(f"{filepath}", "wb") as streamw: + + for data in response.iter_content(): + + if data: + + streamw.write(data) + + try: + + subprocess.run(["pip", "install", f"{filepath}"], check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + + os.remove(filepath) + + except Exception as e: + + print(f"[{bold}{red}ALERT{reset}]: {bold}{white}Hey {username} Update Failed for Shodanx, Please try to update the ShodanX manually{reset}") + + quit() + + else: + + print(f"[{bold}{red}ALERT{reset}]: {bold}{white}Hey {username} Update Failed for Shodanx, Please try to update the ShodanX manually{reset}") + + quit() + + except Exception as e: + + pass + + + +def updatelog(config, username): #atlast after update + + try: + url = f"https://raw.githubusercontent.com/sanjai-AK47/ShodanX/main/.github/workflows/updatelog" + + response = requests.get(url, timeout=20, stream=True) + + info = f"{config}/updatelog.py" + + if response.status_code == 200: + + with open(info, "wb") as streamw: + + for content in response.iter_content(): + + if content: + + streamw.write(content) + + try: + + subprocess.run(["python3", f"{info}"], check=True) + + os.remove(info) + + except Exception as e: + + print(f"[{bold}{red}ALERT{reset}]: {bold}{white}Hey {username} unable to fetch update logs so please visit here --> http://github.com/sanjai-AK47/ShodanX{reset}") + + quit() + + except Exception as e: + + pass + \ No newline at end of file diff --git a/shodanx/modules/user/__init__.py b/shodanx/modules/user/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/shodanx/modules/user/__pycache__/__init__.cpython-311.pyc b/shodanx/modules/user/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1f1b782e77870a71d3cd3621543c3a077cf4c94b GIT binary patch literal 162 zcmZ3^%ge<81h1!kNd?i5K?DpiLK&agfQ;!3DGb33nv8xc8H$*I{LdiCU#9vQ`MIh3 z#ff=YiJAJr8Tl!Rc@g@>V7fv-H$SB`C$(6=v^cd$KR!M)FS8^*Uaz3?7l#c*%C3kN ZXbQ-lVtyd;ftit!@dE>lC}IYR0RY8dCguPD literal 0 HcmV?d00001 diff --git a/shodanx/modules/user/__pycache__/user.cpython-311.pyc b/shodanx/modules/user/__pycache__/user.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b5f333a4c64039c2358eafaf9a0fd0324ac6f85c GIT binary patch literal 801 zcmZ`%&ubGw6n-)gP2Nl2wpS+L&WqVvAZN`li9GFnkYts zc*s?##=oEa3eiUzG zX(uQ{8`#q;&=9>7OMsIir+bB}ZzkDBot-1Cx_)YpV;()joBt0_I>RGos0{^R7aK~j zCjd?qZBJHAXp>ijDP!LxO=w94Xp)zJry^%~D4$C|&tb`8&$yayty%R(#b!F?$|m-(V$I^ja>eDu z0HQU^*TCO1)eYjqK&ZDUPB#?4uP)BIF?+`lR zg(C98P@CVn^LBY_xvO-QgW=Si2UISTlPD;+KRoJdiGh~b(@J0HXZ5SzUrY`blbC*| z-_#%1`YZXtN*>d_LPY(ir`6vke{G-{Kum+ M1c&+;oLS`l1yRtodjJ3c literal 0 HcmV?d00001 diff --git a/shodanx/modules/user/user.py b/shodanx/modules/user/user.py new file mode 100644 index 0000000..bdffe8d --- /dev/null +++ b/shodanx/modules/user/user.py @@ -0,0 +1,17 @@ +import os +def get_username(): + + try: + + username = os.getlogin() + + except OSError: + + username = os.getenv('USER') or os.getenv('LOGNAME') or os.getenv('USERNAME') or 'Unknown User' + + except Exception as e: + + username = "Unknown User" + + + return username \ No newline at end of file diff --git a/shodanx/modules/verify/__init__.py b/shodanx/modules/verify/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/shodanx/modules/verify/__pycache__/__init__.cpython-311.pyc b/shodanx/modules/verify/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c1f253cccdb815b65c71fd2903ac9228ee3c5975 GIT binary patch literal 164 zcmZ3^%ge<81WPXdO$E`9K?DpiLK&agfQ;!3DGb33nv8xc8H$*I{LdiCU*`H5`MIh3 z#ff=YiJAJr8Tl!Rc@g@>V7fv-H$SB`C$(6=EVU>ztx`WeJ~J<~BtBlRpz;@o4Mfte bh!toK$fja`An}2jk&*EO1B@tQ28sayC`u>0 literal 0 HcmV?d00001 diff --git a/shodanx/modules/verify/__pycache__/verify.cpython-311.pyc b/shodanx/modules/verify/__pycache__/verify.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f2c1afb8419ca42daa6045ab73bba9631785d428 GIT binary patch literal 420 zcmZ3^%ge<81lJ$@P2CElAA>kBzyxJ{mH;xQGo&!2Fy=7iGDa~mGNdrIFhnt@Fa|Sd zGQR{V^Gjxgss>TaQ2bdB$e7Mhf+Uv(XV)++1F~1c`L&ESAoCdgG?{L(q$HLk-eNCH zEh^5;&jSiD7i6awu>wsi2DwT>;g_j?Mt*LpesN-6R$``pa7KPgVqS!PF_^B<&&^LM z%}FiR2O5x>Rtcr_3My~0K}3o;fTpm3j1vPA4Gd5DgnDvj7+>U*zrrWq;QoMHsKM_u zP=-O1<(5!pZb5!gNls>xUT$hhBG_ddFjf)B5U^=08HzYTY<3{=i^B%u0=pt!AQ$At eVgn%Yftit!@dkt91yuBbjfGM80|O=jHW2`=kziQ> literal 0 HcmV?d00001 diff --git a/shodanx/modules/verify/verify.py b/shodanx/modules/verify/verify.py new file mode 100644 index 0000000..32d9192 --- /dev/null +++ b/shodanx/modules/verify/verify.py @@ -0,0 +1,8 @@ +import importlib.metadata as data + + +def verify(pkg): #After version verified call the updatelog for updates information + + version = data.version(pkg) + + return version diff --git a/shodanx/modules/version/__init__.py b/shodanx/modules/version/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/shodanx/modules/version/__pycache__/__init__.cpython-311.pyc b/shodanx/modules/version/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c64a78a70e913d4bfdeb3579692d1e90c18cb82f GIT binary patch literal 165 zcmZ3^%ge<81X|O+q=M+jAOZ#$p^VRLK*n^26oz01O-8?!3`I;p{%4TnFAM#Q{M=Oi z;>5hH#7zC*jQo_uya@ebFkPXao1apelUl4_mReMtnV+X0AD@|*SrQ+wS5Wzj!v-R2 bSHuc52xL_;Kalvq%*e?2fdNJoF$2W_=%OcY literal 0 HcmV?d00001 diff --git a/shodanx/modules/version/__pycache__/version.cpython-311.pyc b/shodanx/modules/version/__pycache__/version.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..391921871087216ce0746ab6924b9a079af85721 GIT binary patch literal 2099 zcmZ`)O>7fK6n^Xd@%k@@nuMezO$siRA&n0pp(0Z1Bql@zBPA&iS5>s}PW^-Jb!XQ} z9L1FnIk-{|6hVnpA>~rqiuPEkS6Wr-(MFaU&B;>5ftw{jLiEzNc6Jl@XU6m9ee>SD zo%b{2Z+$*DU|ad>1-T~x{AmKK@q5hk6%OD&sGxFLh<9c#&LMVW9XUSE=Y+VB6XPP+ zkx6l>t?P_C9YCBJ*)oW{%i=Tb@0#c#T7QJ2(>Nef#$%z3)8ck)E7poRKg99KUckM4 z#%sa24^fYe{D=CJz(#KpF>}mDgNTM~ z^cL}x0O?Ee@nMV#WJW9r8Saii{B4!rg!plln}?9_%v6hocqUxZC}F~clDNghd83pi z3Cn^x`*4^Edw!>rEUpYLFzm1bWNdx|6Q}Y&2o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