Created
December 20, 2023 23:58
-
-
Save BlazeK1ng420/0dbb32436d702b71a2b45949e3ca5d48 to your computer and use it in GitHub Desktop.
Send raw xmpp stanzas via TomersApi
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
elif mssg.startswith("$xmpp") and safemode == False: | |
com = mssg.replace("$xmpp ", "") | |
info = com.split(" ", 2) | |
loops = info[0] | |
target = info[1] | |
stanza = info[2] | |
self.client.send_chat_message(JID, "Sending stanza to " + target + " " +str(loops) + "x!") | |
time.sleep(1) | |
if target.endswith("@groups.kik.com"): | |
for _ in range(int(loops)): | |
if not safemode: | |
new_stanza = stanza.replace("{type}", "groupchat") | |
new_stanza = new_stanza.replace("{jid}", target) | |
new_stanza = new_stanza.replace("{uuid}", str(new.make_kik_uuid())) | |
new_stanza = new_stanza.replace("{ts}", str(new.make_kik_timestamp())) | |
self.client.connection.send_raw_data(new_stanza.encode()) | |
time.sleep(int(delay)) | |
self.client.send_chat_message(JID, "Sent stanza " + loops + "x to " + target) | |
else: | |
for _ in range(int(loops)): | |
if not safemode: | |
new_stanza = stanza.replace("{type}", "chat") | |
new_stanza = new_stanza.replace("{jid}", target) | |
new_stanza = new_stanza.replace("{uuid}", str(new.make_kik_uuid())) | |
new_stanza = new_stanza.replace("{ts}", str(new.make_kik_timestamp())) | |
self.client.connection.send_raw_data(new_stanza.encode()) | |
time.sleep(int(delay)) | |
self.client.send_chat_message(JID, "Sent stanza " + loops + "x to " + target) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment