-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbugmenot.py
More file actions
34 lines (23 loc) · 940 Bytes
/
bugmenot.py
File metadata and controls
34 lines (23 loc) · 940 Bytes
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
import requests
from bs4 import BeautifulSoup as BS
def main():
url = input('Enter the URL: ').strip('https')
url = url.strip('://')
r = requests.get(f'http://bugmenot.com/view/{url}')
html = BS(r.content, 'html.parser')
no_site = 'This site has been barred from the bugmenot system.'
not_found = 'No logins found.'
nosite = html.find('p')
notfound = html.find('div', {'id': 'share-it'})
if no_site in nosite:
print('\nThis site has been barred from the bugmenot system.')
elif not_found in notfound.text:
print('\nNo logins found.')
else:
for i in html.find_all('article'):
kbd = i.find_all('kbd')
li = i.find('li', class_ = 'success_rate')
print(f"\nUsername: {kbd[0].text}\nPassword: {kbd[1].text} \nSuccess rate: {li.text.strip(' success rate')}\n")
while True:
print()
main()