Skip to content

Instantly share code, notes, and snippets.

import requests
def download_file_from_google_drive(id, destination):
def get_confirm_token(response):
for key, value in response.cookies.items():
if key.startswith('download_warning'):
return value
return None
@Hiromi-nee
Hiromi-nee / and100.py
Created November 14, 2014 15:28
QIWICTF2014 MISC100 solver
import requests
r = requests.post('https://qiwictf2014.ru:40443', auth=('xxx','nshvtyfnjh'))
print r.status_code
print r.headers
print r.text
print r.json()
@Hiromi-nee
Hiromi-nee / Accounts.java
Last active August 29, 2015 14:09
[QIWICTF2014 - MISC100] Stolen prototype - Accounts.java Excerpt
private String d;
private String a()
{
StringBuilder stringbuilder;
DefaultHttpClient defaulthttpclient;
UsernamePasswordCredentials usernamepasswordcredentials;
HttpGet httpget;
Character character = Character.valueOf('n'); //note this
String s = d.substring(0, 1); //note this
@Hiromi-nee
Hiromi-nee / solve.py
Created November 3, 2014 10:29
tkbctf4 monochrome_bar
#! /usr/bin/python2
from sys import argv
from PIL import Image
im = Image.open(argv[1])
imageW = im.size[0]
imageH = im.size[1]
pixels = im.load()
@Hiromi-nee
Hiromi-nee / XNU syscalls
Created April 20, 2012 08:05
XNU Syscall location
xnu_quick_test -- performs some tests on xnu
http://www.opensource.apple.com/source/xnu/xnu-1456.1.26/tools/tests/xnu_quick_test/README
XNU Mach syscalls
http://www.opensource.apple.com/source/xnu/xnu-1699.24.23/osfmk/kern/syscall_sw.c
http://www.opensource.apple.com/source/xnu/xnu-1699.24.23/osfmk/kern/syscall_emulation.c
http://www.opensource.apple.com/source/xnu/xnu-1699.24.23/osfmk/kern/syscall_subr.c
XNU BSD syscalls
http://www.opensource.apple.com/source/xnu/xnu-1699.24.23/bsd/kern/syscalls.master