-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscraper.py
More file actions
32 lines (25 loc) · 911 Bytes
/
scraper.py
File metadata and controls
32 lines (25 loc) · 911 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
import requests
from bs4 import BeautifulSoup
import subprocess
# This is going to be a python script in where you take a "list of" and then create a dictionary from it
# This was used during a class assignemnt where we were to take a wikipedia page and extrapolate the web content and
# create a dictionary to be used in a dictionary attack
url = 'https://en.wikipedia.org/wiki/List_of_Gundam_manga_and_novels'
response = requests.get(url)
html = response.content
soup = BeautifulSoup(html)
rawData = set()
seen = set()
unique = []
for tableFinder in soup.findAll("i"):
rawData.add(tableFinder.text.replace("<i>",""))
for x in rawData:
if x not in seen:
unique.append(x)
seen.add(x)
#
file1 = open("gundamDict.txt","a")
for x in unique:
file1.write(x+"\n")
file1.close();
subprocess.call(["hashcat","--force","--show", "-a", "0", "-m", "0", "gundamHash.hash", "gundamDict.txt"])