Browse Source

Uncommented Commented things that shouldve been uncommented. also added item rating in listing parser.

main
Joshua 1 year ago
parent
commit
2bf3e7447e
2 changed files with 38 additions and 25 deletions
  1. +19
    -19
      MarketPlaces/HiddenMarket/crawler_selenium.py
  2. +19
    -6
      MarketPlaces/HiddenMarket/parser.py

+ 19
- 19
MarketPlaces/HiddenMarket/crawler_selenium.py View File

@ -29,17 +29,17 @@ baseURL = 'http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion
# Opens Tor Browser, crawls the website
def startCrawling():
# opentor()
opentor()
marketName = getMKTName()
# driver = getAccess()
driver = getAccess()
# if driver != 'down':
# try:
# login(driver)
# crawlForum(driver)
# except Exception as e:
# print(driver.current_url, e)
# closetor(driver)
if driver != 'down':
try:
login(driver)
crawlForum(driver)
except Exception as e:
print(driver.current_url, e)
closetor(driver)
new_parse(marketName, baseURL, False)
@ -211,27 +211,27 @@ def getInterestedLinks():
links = []
# # Civil Software
# links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/civil_softwares')
links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/civil_softwares')
# # Tutorials - Carding
# links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/carding')
links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/carding')
# # Digital - Hacks
# links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/hacks')
links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/hacks')
# Digital - Exploit Kit
# links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/exploit_kit')
links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/exploit_kit')
# # 0Day
# links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/0day')
links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/0day')
# Digital Forensics
# links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/digital_forensics')
links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/digital_forensics')
# Tutorials - Mining
# links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/mining')
links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/mining')
# Tutorials - Worms
# links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/worms')
links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/worms')
# Tutorials - Viruses
links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/viruses')
# Tutorials - Trojans
# links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/trojans')
links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/trojans')
# Tutorials - Botnets
# links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/botnets')
links.append('http://mipx6eedtsvfgfcmbm3utjedgjez2w4dzjdrbhtd2mt3cicwhhzspxqd.onion/category/botnets')
return links


+ 19
- 6
MarketPlaces/HiddenMarket/parser.py View File

@ -203,6 +203,19 @@ def hiddenmarket_listing_parser(soup):
sale = tb[-2].text.strip()
sold.append(sale)
# Finding Item Rating
if num == '0':
item_rating = '-1'
else:
item_rating = card.next_sibling.find('div', {'class': 'stats'}).find('div', {'class': "stars2"})
item_rating = item_rating.get('style')
item_rating = item_rating.replace("width:", "")
item_rating = item_rating.replace("%", "")
item_rating = (float(item_rating) * 5.0) / 100.0
item_rating = "{:.{}f}".format(item_rating, 2)
rating_item.append(item_rating)
# Finding shipping info
shipping = card.next_sibling.find('div', {'class': "shipping"}).text.split('>')
# SHip from
@ -213,12 +226,12 @@ def hiddenmarket_listing_parser(soup):
shipTo.append(destination)
# Finding description (site only shows partial description on listing pages)
description = card.next_sibling.find('div', {'class': "description"}).text
description = description.replace("\n", " ")
description = description.replace("\r", " ")
description = description.replace("-", " ")
description = description.strip()
describe.append(description)
# description = card.next_sibling.find('div', {'class': "description"}).text
# description = description.replace("\n", " ")
# description = description.replace("\r", " ")
# description = description.replace("-", " ")
# description = description.strip()
# describe.append(description)
# Searching for CVE and MS categories
cve = card.findAll(text=re.compile('CVE-\d{4}-\d{4}'))


Loading…
Cancel
Save