export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"os" | |
"context" | |
"github.com/things-go/go-socks5" | |
"golang.org/x/net/proxy" | |
"flag" | |
"net" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[SwitchyOmega Conditions] | |
; Require: SwitchyOmega >= 2.3.2 | |
; cn域名都不走代理 | |
*.cn | |
*.0daydown.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qemu-system-mipsel -kernel kernel -hda rootfs.ext2 \ | |
-append 'root=/dev/hda console=ttyS0 rw physmap.enabled=0 noapic' \ | |
-net nic -net tap,ifname=tap0,script=no,downscript=no \ | |
-m 256M -nographic -serial stdio -monitor null \ | |
-no-reboot | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
insert into ctfd.users (id,name,email,password,created) | |
select id,name,email,password,joined from bak.teams; | |
update ctfd.users set type = "user",bracket = NULL,hidden=0,verified=0,banned=0; | |
insert into ctfd.challenges(id,name,description,max_attempts,value,category,type,state) | |
select id,name,description,max_attempts,value,category,"dynamic","visible" from bak.challenges; | |
insert into dynamic_challenge (id,initial,minimum,decay) | |
select id,value,value/10,15 from ctfd.challenges; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir rootfs | |
$ mv rootfs.cpio ./rootfs/rootfs.cpio.gz | |
$ cd rootfs | |
$ gunzip rootfs.cpio.gz | |
$ cpio -idmv < rootfs.cpio | |
$ rm -rf rootfs.cpio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pwn import * | |
#启用调试模式,会将以后的交互信息打印出来 | |
context.log_level="debug" | |
# 连接 | |
# 和127.0.0.1的9999端口建立tcp连接 | |
r=remote("127.0.0.1",9999) | |
# 运行一个可执行程序,方便本地调试 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pwn import * | |
_IO_FILE_plus_size = { | |
'i386':0x98, | |
'amd64':0xe0 | |
} | |
_IO_FILE_plus = { | |
'i386':{ | |
0x0:'_flags', | |
0x4:'_IO_read_ptr', | |
0x8:'_IO_read_end', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def extend_gcd(a,b): | |
if b==0: | |
return a,1,0 | |
else: | |
g,s,t=extend_gcd(b,a%b) | |
return g,t,s-a/b*t | |
def reverse(a,N): | |
return extend_gcd(a,N)[1] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "br-tree.h" | |
#include <stdlib.h> | |
int cmp(KEY_TYPE a, KEY_TYPE b) { | |
return a < b; | |
} | |
void init_tree(BR_Tree* tree) { | |
tree->end = (Node)malloc(sizeof(struct _Node)); | |
tree->end->color = BLACK; |
NewerOlder