Skip to content

Added Dockerfile, usage and snusbase email module #205

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:2.7-slim

WORKDIR /root
RUN apt-get update && apt-get install -y git
RUN git clone https://github.com/DataSploit/datasploit.git datasploit

WORKDIR datasploit
COPY config.py .
RUN pip install -r requirements.txt
CMD python datasploit_config.py
ENTRYPOINT ["python", "datasploit.py"]
CMD ["--help"]
41 changes: 41 additions & 0 deletions Dockerfile_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Datasploit

## Source

https://github.com/DataSploit/datasploit

## Usage

```bash
cd datasploit/
touch config.py
docker build -t datasploit .
docker run -it datasploit:latest -i <target>
```

## Help

```bash
usage: datasploit.py [-h] -i TARGET [-a] [-q] [-o OUTPUT]

____/ /____ _ / /_ ____ _ _____ ____ / /____ (_)/ /_
/ __ // __ `// __// __ `// ___// __ \ / // __ \ / // __/
/ /_/ // /_/ // /_ / /_/ /(__ )/ /_/ // // /_/ // // /_
\__,_/ \__,_/ \__/ \__,_//____// .___//_/ \____//_/ \__/
/_/

Open Source Assistant for #OSINT
www.datasploit.info

optional arguments:
-h, --help show this help message and exit
-i TARGET, --input TARGET
Provide Input
-a, --active Run Active Scan attacks
-q, --quiet Run scans in automated manner accepting default
answers
-o OUTPUT, --output OUTPUT
Provide Destination Directory

Connect at Social Media: @datasploit
```
2 changes: 2 additions & 0 deletions config_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
pwnedlist_api=""
pwnedlist_iv=""
pwnedlist_secret=""
snusbase_secret_url=""
snusbase_token=""
spyonweb_access_token = ""
twitter_consumer_key=""
twitter_consumer_secret=""
Expand Down
78 changes: 78 additions & 0 deletions emails/email_snusbase.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#!/usr/bin/env python

### Uses the snusbase.com API to query service for leaked accounts based on the email address
### API: snusbase.com
### Make sure your secret API url and token are saved in the config.py file
### Maintained by @khast3x

import base
import config as cfg
import requests
import json
from termcolor import colored
import sys

# Control whether the module is enabled or not
ENABLED = True
class style:
BOLD = '\033[1m'
END = '\033[0m'


def banner():
print colored('\n---> Checking snusbase database leak\n', "blue")
pass

def snusbaseemailsearch(email):

url = cfg.snusbase_secret_url
payload = {"type": "email", "term": email}
headers = {
'Authorization': cfg.snusbase_token,
}
response = requests.request("POST", url, data=payload, headers=headers)
return response.content

def main(email):
# Use the email variable to do some stuff and return the data
if cfg.snusbase_secret_url != "" and cfg.snusbase_token != "":
return json.loads(snusbaseemailsearch(email))
else:
return [False, "INVALID_API"]
print email
return []


def output(data, email=""):
if data["result"]:
for res in data["result"]:
print colored("---------------------", "yellow")
# Colour result if password is present
if res["password"]:
print colored("email: %s", "green") % res["email"]
print colored("password: %s", "green") % res["password"]
else:
print "email: %s" % res["email"]
print "password: %s" % res["password"]
# Print only if present
if res["username"]:
print "username: %s" % res["username"]
if res["hash"]:
print "hash: %s" % res["hash"]
print "salt: %s" % res["salt"]
print colored("\nFound %s results\n", "blue") % data["result_size"]

else:
print "\n--- No data found in snusbase ---\n"
return


if __name__ == "__main__":
try:
email = sys.argv[1]
banner()
result = main(email)
output(result, email)
except Exception as e:
print e
print "Please provide an email as argument"