forked from M4xSec/spammer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspammer.py
94 lines (85 loc) · 3.77 KB
/
spammer.py
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import pyautogui
from time import sleep
import random
import sys
import os
from platform import system
def banner():
print('''\033[31m
██████ ██▓███ ▄▄▄ ███▄ ▄███▓ ███▄ ▄███▓▓█████ ██▀███
▒██ ▒ ▓██░ ██▒▒████▄ ▓██▒▀█▀ ██▒▓██▒▀█▀ ██▒▓█ ▀ ▓██ ▒ ██▒
░ ▓██▄ ▓██░ ██▓▒▒██ ▀█▄ ▓██ ▓██░▓██ ▓██░▒███ ▓██ ░▄█ ▒
▒ ██▒▒██▄█▓▒ ▒░██▄▄▄▄██ ▒██ ▒██ ▒██ ▒██ ▒▓█ ▄ ▒██▀▀█▄
▒██████▒▒▒██▒ ░ ░ ▓█ ▓██▒▒██▒ ░██▒▒██▒ ░██▒░▒████▒░██▓ ▒██▒
▒ ▒▓▒ ▒ ░▒▓▒░ ░ ░ ▒▒ ▓▒█░░ ▒░ ░ ░░ ▒░ ░ ░░░ ▒░ ░░ ▒▓ ░▒▓░
░ ░▒ ░ ░░▒ ░ ▒ ▒▒ ░░ ░ ░░ ░ ░ ░ ░ ░ ░▒ ░ ▒░
░ ░ ░ ░░ ░ ▒ ░ ░ ░ ░ ░ ░░ ░
░ ░ ░ ░ ░ ░ ░ ░
\033[00m
\033[00m \033[01m\033[33m >>> cOdEd By: Predator0x300 <<<\033[00m\033[00m\n
\033[01m\033[33m >>>--- GitHub:\033[31m https://github.com/Predator0x300 \033[00m\033[33m ---<<<\033[00m\033[00m\n''')
def clear():
if system() == 'Linux':
os.system("clear")
if system() == 'Windows':
os.system('cls')
os.system('color a')
else:
pass
os.system("clear")
class Spammer_auto():
def __init__(self, file_name):
clear()
banner()
print("\n\t\033[01m\033[31m{+} Spamming Started!....... ;))\n\033[00m\033[00m")
sleep(5)
self.txt_file = open(file_name, 'r').read()
self.split_file = self.txt_file.splitlines()
for max in range(80):
pyautogui.typewrite(random.choice(self.split_file))
pyautogui.press("enter")
sleep(0.5)
class Spammer_manual():
def __init__(self, file_name, speed):
print("{~} Enter the Spam_count: ")
count = int(input(">>> "))
clear()
banner()
print("\n\t{+} Spamming Started!....... ;))\n")
sleep(6)
self.txt_file = open(file_name, 'r').read()
self.split_file = self.txt_file.splitlines()
for max in range(count):
pyautogui.typewrite(random.choice(self.split_file))
pyautogui.press("enter")
sleep(speed)
clear()
banner()
def usage():
print("{+} Usage:\n")
print("\tAuto: python3 spammer.py -a -f file_name")
print("\tManual: python3 spammer.py -m -f file_name -i fast\n")
print("{+} Help:\n\t{!} -a : auto | -m : manual\n\t{~} -c : count_spam (default: 80)")
print("\t{~} -i : interval/slow:1/med:0.05/fast:0.0005 (default: med)\n")
if (len(sys.argv) == 4):
if(sys.argv[1]== "-a" and sys.argv[2] == "-f"):
Spammer_auto(sys.argv[3])
else:
usage()
elif (len(sys.argv) == 6):
if(sys.argv[1]== "-m" and sys.argv[2] == "-f" and sys.argv[4]=="-i"):
if(sys.argv[5] == "fast"):
speed = 0.0005
Spammer_manual(sys.argv[3],speed)
elif(sys.argv[5] == "med"):
speed = 0.05
Spammer_manual(sys.argv[3],speed)
elif(sys.argv[5] == "slow"):
speed = 1
Spammer_manual(sys.argv[3], speed)
else:
usage()
else:
usage()
else:
usage()