Created
September 19, 2017 18:01
-
-
Save projectyotta/e2211c55de668086c6291386eaf6fef6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# have t figure out how to login to the site , and then hopefully extract the information I need . | |
import socks | |
import socket | |
import stem.process | |
import requests | |
from bs4 import BeautifulSoup | |
import win_inet_pton | |
SOCKS_PORT=7040# You can change the port number | |
tor_process = stem.process.launch_tor_with_config(tor_cmd='C:\\Users\\raosa\\Desktop\\Tor Browser\\Browser\\TorBrowser\\Tor\\tor.exe',config = {'SocksPort': str(SOCKS_PORT),},) | |
socks.setdefaultproxy(proxy_type=socks.PROXY_TYPE_SOCKS5,addr="127.0.0.1", port=SOCKS_PORT) | |
socket.socket = socks.socksocket | |
page= requests.get("http://lchudifyeqm4ldjj.onion/?category=125") | |
soup= BeautifulSoup(page.content,'html.parser') | |
html1=soup.find_all("script",{"type":"text/javascript"}) | |
s=str(html1) | |
start = 'var proddata = ' | |
end = '$( document ).ready' | |
print (s[s.find(start)+len(start):s.rfind(end)]) | |
tor_process.kill() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment