-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPy3_sec2020_whatsapp_spammer_V_1.0.py
151 lines (132 loc) · 12 KB
/
Py3_sec2020_whatsapp_spammer_V_1.0.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# ____ _____ ____ _____ ____ ____ ___ ____ ___
#| _ \ _ _|___ / / ___|| ____/ ___|___ \ / _ \___ \ / _ \
#| |_) | | | | |_ \ \___ \| _|| | __) | | | |__) | | | |
#| __/| |_| |___) | ___) | |__| |___ / __/| |_| / __/| |_| |
#|_| \__, |____/ |____/|_____\____|_____|\___/_____|\___/
# |___/
#__ ___ _ _ _____ ____ _ ____ ____
#\ \ / / | | | / \|_ _/ ___| / \ | _ \| _ \
# \ \ /\ / /| |_| | / _ \ | | \___ \ / _ \ | |_) | |_) |
# \ V V / | _ |/ ___ \| | ___) / ___ \| __/| __/
# \_/\_/ |_| |_/_/ \_\_| |____/_/ \_\_| |_|
#
# ____ ____ _ __ __ __ __ _____ ____ __ __ _ ___
#/ ___|| _ \ / \ | \/ | \/ | ____| _ \ \ \ / / / | / _ \
#\___ \| |_) / _ \ | |\/| | |\/| | _| | |_) | \ \ / / | | | | | |
# ___) | __/ ___ \| | | | | | | |___| _ < \ V / | | _ | |_| |
#|____/|_| /_/ \_\_| |_|_| |_|_____|_| \_\ \_/ |_| (_) \___/
#
#
#----------------------------------------------------------------------------------------------
# coded by Arijit Bhowmick
#
# 8ae503b206749490f1a2a2b4fe281331903625132f5f207554423c950111fa24
#
#--------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------
# MODULES
#--------------------------------------------------------------------------------------------
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import hashlib
import string
import random
#--------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------
# Driver Location
#--------------------------------------------------------------------------------------------------------
#
# geckodriver is a Firefox web driver which is usually use to operate firefox browser
# You can download latest geckodriver from https://github.com/mozilla/geckodriver/releases
# I have provided some geckodriver for Linux, Windows, Mac
#--------------------------------------------------------------------------------------------------------
driver_location = "/home/kali/Desktop/geckodriver"
#--------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------
# Information
#--------------------------------------------------------------------------------------------------------
receiver = input(str('\033[32m'+"Enter the name of the contact_name/group_name to which you want to spam --> "+'\033[32m')) # Enter the name correctly
num_times = input('\033[32m'+"\nEnter the number of times you want to send --> "+'\033[32m')
num_times = int(num_times)
#--------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------
# Random SHA256_hashed_string generator ( START )
#--------------------------------------------------------------------------------------------------------
def random_hash_generator(size=75,chars=string.ascii_uppercase + string.digits):
random_string=''.join(random.choice(chars) for x in range(size))
return hashlib.sha256(random_string.encode()).hexdigest()
#--------------------------------------------------------------------------------------------------------
# Random SHA256_hashed_string generator ( END )
#--------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------
# Random string generator ( START )
#--------------------------------------------------------------------------------------------------------
def random_string_generator(size=75,chars=string.ascii_uppercase + string.digits):
return ''.join(random.choice(chars) for x in range(size))
#--------------------------------------------------------------------------------------------------------
# Random string generator ( END )
#--------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------
# Type of the thing you want to send
#--------------------------------------------------------------------------------------------------------
choice='False'
while choice=='False':
choice = input('\033[32m'+'\nPlease enter the option to continue\n1. Send a particular message\n2. Send Random Messages(alphabets+number)\n3. Send Hashed Messages(sha256)\n\n--> '+'\033[32m')
choice = int(choice)
if choice == 1:
message = input(str('\033[32m'+'\nType the message you want to send --> '+'\033[32m'))
elif choice == 2:
message = random_string_generator()
elif choice == 3:
message = random_hash_generator()
else:
print('\033[91m'+'\n!!!You have entered an incorrect option please try again!!!'+'\033[91m')
choice = 'False'
#--------------------------------------------------------------------------------------------------------
# END
#--------------------------------------------------------------------------------------------------------
print('''\033[34m
____ _ _ _ _ _ _ _
░██████╗████████╗░█████╗░██████╗░████████╗██╗███╗░░██╗░██████╗░ ░█████╗░████████╗████████╗░█████╗░░█████╗░██╗░░██╗
██╔════╝╚══██╔══╝██╔══██╗██╔══██╗╚══██╔══╝██║████╗░██║██╔════╝░ ██╔══██╗╚══██╔══╝╚══██╔══╝██╔══██╗██╔══██╗██║░██╔╝
╚█████╗░░░░██║░░░███████║██████╔╝░░░██║░░░██║██╔██╗██║██║░░██╗░ ███████║░░░██║░░░░░░██║░░░███████║██║░░╚═╝█████═╝░
░╚═══██╗░░░██║░░░██╔══██║██╔══██╗░░░██║░░░██║██║╚████║██║░░╚██╗ ██╔══██║░░░██║░░░░░░██║░░░██╔══██║██║░░██╗██╔═██╗░
██████╔╝░░░██║░░░██║░░██║██║░░██║░░░██║░░░██║██║░╚███║╚██████╔╝ ██║░░██║░░░██║░░░░░░██║░░░██║░░██║╚█████╔╝██║░╚██╗
╚═════╝░░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░╚═╝░░░╚═╝░░░╚═╝╚═╝░░╚══╝░╚═════╝░ ╚═╝░░╚═╝░░░╚═╝░░░░░░╚═╝░░░╚═╝░░╚═╝░╚════╝░╚═╝░░╚═╝
\033[34m''')
#--------------------------------------------------------------------------------------------------------
# Open Firefox_Browser and open https://web.whatsapp.com/
#--------------------------------------------------------------------------------------------------------
driver=webdriver.Firefox(executable_path=driver_location)
driver.get("https://web.whatsapp.com/")
#--------------------------------------------------------------------------------------------------------
# END
#--------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------
# Waiting time to scan the QR code
#--------------------------------------------------------------------------------------------------------
driver.implicitly_wait(60)
#--------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------
# Xpath of the search_box
#--------------------------------------------------------------------------------------------------------
search_sender=driver.find_element_by_xpath("/html/body/div[1]/div/div/div[3]/div/div[1]/div/label/div/div[2]")
#--------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------
# Search the Receiver
#--------------------------------------------------------------------------------------------------------
search_sender.send_keys(receiver,Keys.RETURN)
#--------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------
# Xpath of the send_Box
#--------------------------------------------------------------------------------------------------------
send_box=driver.find_element_by_xpath("/html/body/div[1]/div/div/div[4]/div/footer/div[1]/div[2]/div/div[2]")
#--------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------
# Message Sending
#--------------------------------------------------------------------------------------------------------
for i in range(num_times):
send_box.send_keys(message,Keys.RETURN)
#--------------------------------------------------------------------------------------------------------
# END
#--------------------------------------------------------------------------------------------------------