Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: powerexploit/Ashok
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0
Choose a base ref
...
head repository: powerexploit/Ashok
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on May 20, 2020

  1. Update README.md

    powerexploit authored May 20, 2020
    Copy the full SHA
    d5c6412 View commit details

Commits on May 25, 2020

  1. Delete whoislookup.py

    powerexploit authored May 25, 2020
    Copy the full SHA
    94f464a View commit details
  2. Added Google Dork Script

    powerexploit committed May 25, 2020
    Copy the full SHA
    9883bb0 View commit details
  3. Copy the full SHA
    c601b09 View commit details
  4. Ashok v1.1

    powerexploit committed May 25, 2020
    Copy the full SHA
    4c4f50e View commit details
  5. Ashok v1.1

    powerexploit committed May 25, 2020
    Copy the full SHA
    c867816 View commit details
  6. Ashok v1.1

    powerexploit committed May 25, 2020
    Copy the full SHA
    099111b View commit details
  7. Ashok v1.1

    powerexploit committed May 25, 2020
    Copy the full SHA
    f75a682 View commit details
  8. Ashok v1.1

    powerexploit committed May 25, 2020
    Copy the full SHA
    bf0e730 View commit details

Commits on May 26, 2020

  1. Ashok v1.1

    powerexploit committed May 26, 2020
    Copy the full SHA
    f859406 View commit details

Commits on May 28, 2020

  1. Update README.md

    powerexploit authored May 28, 2020
    Copy the full SHA
    b9ff7db View commit details

Commits on Jul 6, 2020

  1. Update README.md

    powerexploit authored Jul 6, 2020
    Copy the full SHA
    255ec56 View commit details

Commits on Jul 7, 2020

  1. Update README.md

    powerexploit authored Jul 7, 2020
    Copy the full SHA
    3ef07da View commit details

Commits on Sep 26, 2020

  1. Update README.md

    powerexploit authored Sep 26, 2020
    Copy the full SHA
    8b0582f View commit details

Commits on Dec 1, 2020

  1. Update README.md

    powerexploit authored Dec 1, 2020
    Copy the full SHA
    51e5768 View commit details

Commits on Dec 2, 2020

  1. Copy the full SHA
    75242e1 View commit details

Commits on Apr 14, 2021

  1. Fixed some code quality issues

    Signed-off-by: ankitdobhal <dobhal.ankit@protonmail.com>
    deepsourcebot authored and powerexploit committed Apr 14, 2021
    Copy the full SHA
    de00831 View commit details

Commits on Nov 22, 2021

  1. Update techanalyzer.py

    powerexploit authored Nov 22, 2021
    Copy the full SHA
    16321ac View commit details
  2. Update requirements.txt

    powerexploit authored Nov 22, 2021
    Copy the full SHA
    762b706 View commit details

Commits on Nov 29, 2021

  1. Update techanalyzer.py

    powerexploit authored Nov 29, 2021
    Copy the full SHA
    65520c1 View commit details

Commits on Jan 3, 2022

  1. Fixed gitbot

    powerexploit authored Jan 3, 2022
    Copy the full SHA
    727d714 View commit details
  2. Update gitbot.py

    powerexploit authored Jan 3, 2022
    Copy the full SHA
    1ea27af View commit details

Commits on Jan 25, 2022

  1. Update gdork.py

    powerexploit authored Jan 25, 2022
    Copy the full SHA
    009278e View commit details
Showing with 180 additions and 126 deletions.
  1. +8 −0 .deepsource.toml
  2. +46 −30 Ashok.py
  3. +12 −0 Dockerfile
  4. +40 −70 README.md
  5. +0 −1 core/bannergrab.py
  6. +21 −0 core/gdork.py
  7. +0 −1 core/geoip.py
  8. +3 −9 core/gitbot.py
  9. +0 −1 core/subdomains.py
  10. +30 −0 core/wayback.py
  11. +0 −1 plugins/subnetlookup.py
  12. +18 −6 plugins/techanalyzer.py
  13. +0 −6 plugins/whoislookup.py
  14. +2 −1 requirements.txt
8 changes: 8 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version = 1

[[analyzers]]
name = "python"
enabled = true

[analyzers.meta]
runtime_version = "3.x.x"
76 changes: 46 additions & 30 deletions Ashok.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,43 @@
#!/usr/bin/python3
import os
import sys
import argparse
import json
import webtech
from requests import get
from core.nmap import nmap
from core.gitbot import gitusers,gitemails
from core.linkextractor import extract
from core.bannergrab import banner
from core.subdomains import sub
from core.geoip import geo
from plugins.whoislookup import whois
from core.wayback import waybackurl,waybackrobots,waybackjson
from core.gdork import dork
from plugins.dnslookup import dnslookup
from plugins.subnetlookup import subnetlookup
from plugins.httpheaders import httpheader
from plugins.techanalyzer import techno
os.system('tput setaf 3')
import sys
os.system('tput setaf 9')
print("""
___ __ __
/ _ | ___ / / ___ / /__
/ __ | (_-< / _ \/ _ \ / '_/
/_/ |_|/___//_//_/\___//_/\_\ v1.0 Osint/Recon Swiss Knife
> by ankitdobhal
▄▄▄ ██████ ██░ ██ ▒█████ ██ ▄█▀
▒████▄ ▒██ ▒ ▓██░ ██▒▒██▒ ██▒ ██▄█▒
▒██ ▀█▄ ░ ▓██▄ ▒██▀▀██░▒██░ ██▒▓███▄░
░██▄▄▄▄██ ▒ ██▒░▓█ ░██ ▒██ ██░▓██ █▄
▓█ ▓██▒▒██████▒▒░▓█▒░██▓░ ████▓▒░▒██▒ █▄
▒▒ ▓▒█░▒ ▒▓▒ ▒ ░ ▒ ░░▒░▒░ ▒░▒░▒░ ▒ ▒▒ ▓▒
▒ ▒▒ ░░ ░▒ ░ ░ ▒ ░▒░ ░ ░ ▒ ▒░ ░ ░▒ ▒░
░ ▒ ░ ░ ░ ░ ░░ ░░ ░ ░ ▒ ░ ░░ ░ > Recon Swiss Army Knife
░ ░ ░ ░ ░ ░ ░ ░ ░ ░ v1.1
""")
os.system('tput setaf 2')
os.system('tput setaf 6')
print("""
Author : Ankit Dobhal | Break||The||Code
Github : https://github.com/ankitdobhal
Website : http://ankitdobhal.github.io/
=========================================
""")
os.system('tput setaf 3')
parser = argparse.ArgumentParser()
parser.add_argument('--headers',help='Httpheaders of target url')
parser.add_argument('--whois',help='Whois of target domain')
parser.add_argument('--dns',help='Dnslookup of target domain')
parser.add_argument('--subdomain',help='Subdomain lookup of target domain')
parser.add_argument('--nmap',help='Nmapscan of target domain')
@@ -38,68 +47,75 @@
parser.add_argument('--cidr',help='Cidr for subnetlookup of target')
parser.add_argument('--banner',help='Banner grabing of target ip address')
parser.add_argument('--geoip',help='GeoIP lookup of target ip address')
parser.add_argument('--wayback',help="Internet Archive Crawling of target domain")
parser.add_argument('--dorknumber',help="Google dorking results number")
args = parser.parse_args()

if args.headers:
print("[+] Extracing http headers of target url")
os.system('tput setaf 10')
httpheader(args.headers)
exit()

if args.whois:
print("[+] Whois lookup of target domain")
os.system('tput setaf 7')
whois(args.whois)
exit()
sys.exit()

if args.nmap:
print("[+] Port scanning of target domain")
os.system('tput setaf 10')
nmap(args.nmap)
exit()
sys.exit()

if args.username:
gitusers(args.username)
gitemails(args.username)
exit()
sys.exit()

if args.cms:
print("[+] Detecting CMS with Identified Technologies and Custom Headers from target url")
os.system('tput setaf 10')
techno(args.cms)
exit()
sys.exit()

if args.cidr:
os.system('tput setaf 10')
subnetlookup(args.cidr)
exit()
sys.exit()

if args.banner:
print("[+] Banner Grabing from target ip address")
os.system('tput setaf 10')
banner(args.banner)
exit()
sys.exit()

if args.dns:
print("[+] DNS lookup of target domain")
os.system('tput setaf 10')
dnslookup(args.dns)
exit()
sys.exit()

if args.subdomain:
print("[+] Subdomain lookup from target domain")
os.system('tput setaf 7')
sub(args.subdomain)
exit()
sys.exit()

if args.extract:
print("[+] Extracting all hidden and visiable links from target url")
os.system('tput setaf 10')
extract(args.extract)
exit()
sys.exit()

if args.geoip:
print("[+] Geoip lookup of target Ip address")
os.system('tput setaf 10')
geo(args.geoip)
exit()
sys.exit()

if args.wayback:
print("[+] Dumping and Crawling Internet Archive Machine With Ashok")
waybackurl(args.wayback)
waybackrobots(args.wayback)
waybackjson(args.wayback)
sys.exit()

if args.dorknumber:
dork(args.dorknumber)
sys.exit()
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:3.8.6-alpine3.11

LABEL name Ashok
LABEL src "https://github.com/ankitdobhal/Ashok"
LABEL creator ankitdobhal
LABEL desc "Incredible Fast Recon Swiss Army Knife."

RUN apk add git && git clone https://github.com/ankitdobhal/Ashok.git Ashok
WORKDIR Ashok
RUN pip install -r requirements.txt
RUN apk add ncurses
ENTRYPOINT [ "python3", "Ashok.py" ]
110 changes: 40 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,99 +1,69 @@

<h1 align="center">
<br>
<a href="https://github.com/ankitdobhal/Ashok"><img src="https://dev-to-uploads.s3.amazonaws.com/i/vbm48fw5v25qju2h8lr4.png" alt="Ashok"></a>
<a href="https://github.com/ankitdobhal/Ashok"><img src="https://dev-to-uploads.s3.amazonaws.com/i/zme8dd2tch116ykohbkb.png" alt="Ashok"></a>
<br>
Ashok
<br>
</h1>

<h4 align="center">Osint Recon Swiss Army Knife</h4>

## Main Features
```python
[+] 1 - HTTP Header Checker

[+] 2 - Whois Lookup

[+] 3 - Dns Lookup

[+] 4 - Banner Graber

[+] 5 - Github Information Extractor
<h4 align="center">Incredible Fast Recon Swiss Army Knife</h4>
<p align="center">
<a href="https://github.com/ankitdobhal/Ashok/releases">
<img src="https://forthebadge.com/images/badges/built-with-love.svg">
<img src="https://img.shields.io/github/release/ankitdobhal/Ashok.svg">
<img src="https://forthebadge.com/images/badges/made-with-python.svg">
</a>
</p>

[+] 6 - Nmap Scan
## 📌 Introduction
**Reconnaissance** is the first phase of penetration testing which means gathering information before any real attacks are planned So Ashok is an Incredible fast recon tool for penetration tester which is specially designed for Reconnaissance phase. And in [Ashok-v1.1](https://github.com/ankitdobhal/Ashok/releases) you can find the [advanced google dorker](https://github.com/ankitdobhal/Ashok/wiki/Usage#Google-dorking-using-number-of-results-as-dorknumber) and [wayback crawling machine](https://github.com/ankitdobhal/Ashok/wiki/Usage#dump-internet-archive-machive-with-json-output-for-single-url).

[+] 7 - Link Extractor
![Ashok](https://dev-to-uploads.s3.amazonaws.com/i/qdtr9nbzanqs8nizl4jr.png)

[+] 8 - Subdomain Identifier

[+] 9 - Subnet Lookup

[+] 10 - Cms/Technology Detector With Custom Headers

[+] 11 - Geoip Lookup
## 💥 Main Features
```python
- Wayback Crawler Machine
- Google Dorking without limits
- Github Information Grabbing
- Subdomain Identifier
- Cms/Technology Detector With Custom Headers
```

## Compatibility
Ashok is a Osint Recon Swiss Army Knife, It is still in a beta state so it it not compatible with windows .It will run with following configuration:
* Operating Systems: Linux, Mac
* Python Versions: Python3.5, Python 3.7

## Installation
Ashok is very simple to install with the following steps :

## ⚡ Installation
```
~> git clone https://github.com/ankitdobhal/Ashok
~> cd Ashok
~> pip3 install -r requirements.txt
~> python3 Ashok.py -h
~> python3.7 -m pip3 install -r requirements.txt
```

## Usage
## 💥 How to use Ashok?
A detailed usage guide is available on [Usage](https://github.com/ankitdobhal/Ashok/wiki/Usage) section of the [Wiki](https://github.com/ankitdobhal/Ashok/wiki).

Ashok is a beginners friendly tool for beginners in penetration testing and OSINT, it can be used with the following command and examples :
But Some index of options is given below:

**[+] Note : You can check whole help page of Ashok with the following command :**
**~> python3 Ashok.py -h**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/2o92zhk3e9hztyer99c0.png)
- [Extract Http Headers from single url](https://github.com/ankitdobhal/Ashok/wiki/Usage#Extract-Http-Headers-from-single-url)
- [Dump internet-archive machine with json output for single url](https://github.com/ankitdobhal/Ashok/wiki/Usage#dump-internet-archive-machive-with-json-output-for-single-url)
- [Google dorking using number of results as dorknumber](https://github.com/ankitdobhal/Ashok/wiki/Usage#Google-dorking-using-number-of-results-as-dorknumber)
- [Dns Lookup of single target domain](https://github.com/ankitdobhal/Ashok/wiki/Usage#Dns-Lookup-of-single-target-domain)
- [Subdomain Lookup of single target domain](https://github.com/ankitdobhl/Ashok/wiki/Usage#Subdomain-Lookup-of-single-target-domain)
- [Port Scan using nmap of single target domain](https://github.com/ankitdobhal/Ashok/wiki/Usage#Port-Scan-using-nmap-of-single-target-domain)
- [Extract data using Github username of target](https://github.com/ankitdobhal/Ashok/wiki/Usage#Extract-data-using-Github-username-of-target)
- [Detect Cms of target url](https://github.com/ankitdobhal/Ashok/wiki/Usage#Detect-Cms-of-target-url)

**Here are some basic example to use Ashok for your Osint recon :**
## Docker
**Ashok** can be launched using a lightweight Python3.8-Alpine Docker image.
```
1. HTTP Header Checker
~> python3 Ashok.py --headers domain_name
example : python3 Ashok.py --headers example.com
```

$ docker pull powerexploit/ashok-v1.2
$ docker container run -it powerexploit/ashok-v1.2 --help
```
2. Whois Lookup
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/h3barsr5x2no12jyjs3k.png)

~> python3 Ashok.py --whois domain_name
example : python3 Ashok.py --whois example.com
```

```
3.Banner Graber
~> python3 Ashok.py --banner ip_address
example : python3 Ashok.py --banner 8.8.8.8
```

```
4. Github Information Extractor
~> python3 Ashok.py --username username_of_github_user
example : python3 Ashok.py --username Elliot
```

```
5. Cms/Technology Detector With Custom Headers
~> python3 Ashok.py --cms url_of_target
example : python3 Ashok.py --cms https://www.example.com
```

## Contribution & License
## ❤️ Contribution
You can contribute in following ways:

- Report bugs
- Develop plugins
- Develop tool
- Give suggestions to make it better
- Fix issues & submit a pull request

1 change: 0 additions & 1 deletion core/bannergrab.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/python3
import sys
from requests import get
import json
def banner(ip):
21 changes: 21 additions & 0 deletions core/gdork.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/python3.7
import os
import time
from googlesearch import search
def dork(amount):
gquery = input("[+] Enter THe Google Dork Query : ")
os.system('tput setaf 6')
print("[+] Google Dorking For Given Dorkquery")
requ = 0
counter = 0
try:
for results in search(gquery, tld="com", lang="en", num=int(amount), start=0, stop=None, pause=2):
counter = counter+1
print ("[+] ", counter, results)
time.sleep(0.1)
requ += 1
if requ >= int(amount):
break
except:
os.system('tput setaf 6')
print("[!] Too many requests")
1 change: 0 additions & 1 deletion core/geoip.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/python3
import sys
from requests import get
def geo(ip):
response = get('https://api.hackertarget.com/geoip/?q=' + ip).text
12 changes: 3 additions & 9 deletions core/gitbot.py
Original file line number Diff line number Diff line change
@@ -14,12 +14,6 @@ def gitusers(username):
print("[+] Number of public gist Repository : ",str(data['public_gists']))

def gitemails(username):
try:
response = res.get("https://api.github.com/users/%s/events/public" %(username))
jsn = response.json()
data = jsn[0]
dump = data["payload"]["commits"][0]["author"]["email"]
print("[+] Email data : ", dump)
except KeyError:
os.system('tput setaf 12')
print("[+] Aww Snap Unable to find out the email address!")
response = res.get("https://api.github.com/users/%s/events" %(username))
expression=re.findall(r'[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}',response.text)
print("[+] Extracting Email data:\n", expression)
1 change: 0 additions & 1 deletion core/subdomains.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/python3
import sys
from requests import get
def sub(domain):
response = get('https://api.hackertarget.com/hostsearch/?q=' + domain).text
Loading