Skip to content

Instantly share code, notes, and snippets.

View SimonTheCoder's full-sized avatar

Simon Shi SimonTheCoder

  • Liaoning, China
View GitHub Profile
@SimonTheCoder
SimonTheCoder / CookieClicker.py
Last active October 13, 2021 01:49
Auto CookieClicker. Press 'ALT' to stop clicker temporarily.
import win32gui
import win32api
import win32con
import re
import time
target_caption_reg = re.compile(".*Cookie Clicker.*")
target_hWnd = None
def enumWindowCallback(hWnd, arg1):
@SimonTheCoder
SimonTheCoder / bin2bmp-0.1.6_python3.py
Created January 17, 2021 12:41
bin2bmp modified for python3. If Image can not be found, install Pillow package(pip3 install Pillow) .
#!/usr/bin/env python3
#"Copyright 2009 Bryan Harris"
#
#This file is part of bin2bmp.py.
#
# bin2bmp.py is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
@SimonTheCoder
SimonTheCoder / same_n_attack.py
Created December 9, 2020 02:46
RSA共模攻击
import gmpy2
n1=21660190931013270559487983141966347279666044468572000325628282578595119101840917794617733535995976710097702806131277006786522442555607842485975616689297559583352413160087163656851019769465637856967511819803473940154712516380580146620018921406354668604523723340895843009899397618067679200188650754096242296166060735958270930743173912010852467114047301529983496669250671342730804149428700280401481421735184899965468191802844285699985370238528163505674350380528600143880619512293622576854525700785474101747293316814980311297382429844950643977825771268757304088259531258222093667847468898823367251824316888563269155865061
e1=65537
c1=11623242520063564721509699039034210329314238234068836130756457335142671659158578379060500554276831657322012285562047706736377103534543565179660863796496071187533860896148153856845638989384429658963134915230898572173720454271369543435708994457280819363318783413033774014447450648051500214508699056865320506104733203716242071136228269326451412159760818676814129428252523248822316
@SimonTheCoder
SimonTheCoder / padBuster.pl
Last active October 19, 2020 04:25
mod of https://github.com/AonCyberLabs/PadBuster/blob/master/padBuster.pl for hacker101 ctf Encrypted Pastebin Flag1.
#!/usr/bin/perl
#
# PadBuster v0.3.3 - Automated script for performing Padding Oracle attacks
# Brian Holyfield - Gotham Digital Science (labs@gdssecurity.com)
#
# Credits to J.Rizzo and T.Duong for providing proof of concept web exploit
# techniques and S.Vaudenay for initial discovery of the attack. Credits also
# to James M. Martin (research@esptl.com) for sharing proof of concept exploit
# code for performing various brute force attack techniques, and wireghoul (Eldar
# Marcussen) for making code quality improvements.
@SimonTheCoder
SimonTheCoder / help.gdb
Last active August 16, 2020 13:04
[61dctf]xwork writeup@ www.jarvisoj.com, copy from https://blog.csdn.net/charlie_heng/article/details/79344425. Modified for learning.
define list_order
x/14gx 0x006ccd60
end
define show_order
set $order_p = *(unsigned long *)(0x6ccd60+($arg0*8))
printf "chunk: %x mem: %x\n",$order_p-16,$order_p
x/2gx ($order_p-16)
@SimonTheCoder
SimonTheCoder / help.gdb
Last active August 4, 2020 13:27
[UCTF2016]twi @www.jarvisoj.com writeup by SimonTheCoder
####
# https://github.com/SimonTheCoder
####
set disassemble-next-line on
set pagination off
define lk
target remote: 1234
end
@SimonTheCoder
SimonTheCoder / aegis.py
Last active July 25, 2020 18:04
Resolve challenge [0ctf2019]aegis @www.jarvisoj.com. aegis.py is from http://blog.eonew.cn/archives/1046. Modified for running under python3 and working on jarvisoj challenge at both remote and local.
from pwn import *
import binascii
# # Create a symbol file for GDB debugging
# try:
# gdb_symbols = '''
# typedef struct note_struct{
# char *malloc_ptr;
# void *cfi_check;
# }note_struct;
@SimonTheCoder
SimonTheCoder / easy_crackme.py
Created July 22, 2020 04:31
For easycrackme.6dbc7c78c9bb25f724cd55c0e1412617 @www.jarvisoj.com
loop_key = [0xab,0xdd,0x33,0x54,0x35,0xef]
test_r = [0xfb,0x9e,0x67,0x12,0x4e,0x9d,0x98,0xab,0x00,
0x06,0x46,0x8a,0xf4,0xb4,0x06,0x0b,0x43,
0xdc,0xd9,0xa4,0x6c,0x31,0x74,0x9c,0xd2,0xa0]
#print(chr(0xfb ^ 0xab))
l = []
@SimonTheCoder
SimonTheCoder / RSA.py
Created July 22, 2020 01:15
RSA demo, from: https://www.cnblogs.com/baigoogledu/p/9858091.html, for RSA CTF @www.jarvisoj.com. Modified for decrypte an int.
# 分解模数n
def rsa_moder(n):
base = 2
while base < n:
if n % base == 0:
return base, n // base
base += 1
# 求欧拉函数f(n)
@SimonTheCoder
SimonTheCoder / wifi.py
Created July 20, 2020 03:53
[护网杯]WPA2 writeup , 转自: https://xz.aliyun.com/t/2892 。稍作修改,以便在python3中运行。
from pwn import *
from binascii import a2b_hex, b2a_hex, a2b_qp
from pbkdf2 import PBKDF2
import hmac
from hashlib import sha1
import struct
from Crypto.Cipher import AES
context.log_level ="debug"
io = remote("pwn.jarvisoj.com", 9893)