Created
April 14, 2021 09:53
-
-
Save Zinkuth/bf6b67159503264a8e8dd65addcdd1ca to your computer and use it in GitHub Desktop.
This python program is used to send the customized User-Agent to the given URL.
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
import wx | |
from wx import html | |
from urllib import request | |
class MyHTMLFrame(wx.Frame): | |
def __init__(self, parent, title, haxedpage): | |
wx.Frame.__init__( | |
self, | |
parent, | |
-1, | |
title, | |
size = (600, 400) | |
) | |
thisHtml = html.HtmlWindow(self) | |
if "gtk2" in wx.PlatformInfo: | |
html.SetStandardFonts() | |
thisHtml.SetPage(haxedpage) | |
my_request = request.Request( | |
url="<-[Enter URL here]->", | |
data = None, | |
headers = { | |
"User-Agent": "Mozilla/5.0 (compatible; <-[Enter new UA Here]->; +http://about.ask.com/en/docs/about/webmasters.shtml)" | |
} | |
) | |
page = request.urlopen(my_request) | |
page = page.read().decode() | |
renderer = wx.App() | |
renderedPage = MyHTMLFrame(None, "EntropyThot Rulz :D", page) | |
renderedPage.Show() | |
renderer.MainLoop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment