-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcarosint.py
More file actions
59 lines (45 loc) · 1.87 KB
/
carosint.py
File metadata and controls
59 lines (45 loc) · 1.87 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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# imports
import requests
from bs4 import BeautifulSoup as bs
try:
print("""
\033[94m CAR OSINT \033[0m
""")
oplate = input("\033[1mLicense Plate: \033[0m")
dplate = oplate.upper()
plate = "".join(oplate.split(" "))
state = input("\033[1mState: \033[0m")
state = state.upper()
print("\n\033[93mSearching...\033[0m")
URL = "https://findbyplate.com/US/"+state+"/"+plate+"/"
page = requests.get(URL, verify=True)
soupPage = bs(page.content, 'html.parser')
mayresults = soupPage.find("h2", {"class": "vehicle-modal"})
mayraw = mayresults.prettify().split("\n")[1]
may = mayraw[1:len(mayraw)]
year = may[0:4]
model = may[5:len(may)]
countryResults = soupPage.find("div", {"data-title": "PlantCountry"})
countryResultsraw = countryResults.prettify().split("\n")[1]
country = countryResultsraw[1:len(countryResultsraw)]
countryResults = soupPage.find("div", {"data-title": "PlantCity"})
countryResultsraw = countryResults.prettify().split("\n")[1]
city = countryResultsraw[1:len(countryResultsraw)]
vtypeResults = soupPage.find("div", {"data-title": "VehicleType"})
vtyperaw = vtypeResults.prettify().split("\n")[1]
type = vtyperaw[1:len(vtyperaw)]
location = city + ", " + country
print("\033[92mDone!\033[0m\n")
print("\033[1mModel:\033[0m \033[1mYear:\033[0m" + " " * 7 + "\033[1mVehicle Type:\033[0m")
print(model + " " * (20 - len(model)) + year + " " + type)
print("\n\033[1mPlate Number:\033[0m \033[1mState:\033[0m \033[1mPlant Location:\033[0m")
print(dplate + " " * (20 - len(dplate)) + state + " " + location)
except KeyboardInterrupt:
print("\n\033[91mExiting...\033[0m")
except AttributeError:
print("\033[91mVehicle Not Found\033[0m")
except:
print("\033[91mError Found, please contact developer\033[0m")
raise;