-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathmain.py
More file actions
79 lines (66 loc) · 2.19 KB
/
main.py
File metadata and controls
79 lines (66 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/env python3
#
# Venmo-OSINT Tool
# Created by sc1341
import argparse
import random
import requests
import os
import json
from banner import banner
from bs4 import BeautifulSoup
from useragents import user_agents
class VenmoOSINT:
def __init__(self, username):
self.username = username
self.profile_data = {}
def scan_profile(self):
"""Scans the target profile and returns the data"""
try:
r = requests.get(f"https://venmo.com/{self.username}",
headers={"User-Agent":random.choice(user_agents)})
except requests.exceptions.ConnectionError:
print("Error, unable to connect to host... check your network connection")
return 1
soup = BeautifulSoup(r.text, "html.parser")
transactions = soup.find_all("div", attrs={"class":"single-payment content-wrap"})
print(f"{self.username} has {len(transactions)} public transactions")
for i, transaction in enumerate(transactions):
send, recv = transaction.find_all("a")
send, recv = send.getText(), recv.getText()
message = transaction.find_all("div", attrs={"class":"paymentpage-text m_five_t"})[0].getText()
date = transaction.find_all("div", attrs={"class":"date"})[0].getText()
export_message = f"{send} paid {recv}{date} for {message}"
print(export_message)
# assign values in dictionary for output
self.profile_data[str(i)] = {"sender":send,
"recipient":recv,
"date":date,
"exportMessage":export_message
}
def save_data(self, filename: str):
"""Saves the data from the scan into a file
:params: filename
:return: none
"""
i = 0
while True:
if (not os.path.exists(filename + str(i))):
with open(f"{filename}{i}.txt", "w") as f:
f.write(json.dumps(self.profile_data))
break
else:
i += 1
def parse_args():
parser = argparse.ArgumentParser(description="Venmo-OSINT Tool, created by sc1341")
parser.add_argument("--username", help="Username", required=True, nargs=1)
parser.add_argument("--filename", help="Output file name", required=True, nargs=1)
return parser.parse_args()
def main():
args = parse_args()
print(banner)
a = VenmoOSINT(args.username[0])
a.scan_profile()
a.save_data(args.filename[0])
if __name__ == "__main__":
main()