Skip to content

Instantly share code, notes, and snippets.

@warriorpaw
warriorpaw / sum.go
Last active November 12, 2023 09:56
package main
import (
"crypto/md5"
"encoding/binary"
"encoding/json"
"flag"
"fmt"
"math/rand"
"net"
@warriorpaw
warriorpaw / main.c
Last active March 29, 2019 18:18
tcp relay with rc4;;
package main
import (
"bytes"
"crypto/rand"
"crypto/rc4"
"crypto/sha256"
"encoding/binary"
"encoding/json"
"fmt"
@warriorpaw
warriorpaw / vxland.go
Created September 4, 2018 14:02
Fake vxlan "server": use tap interface to simulate vxlan for kernel < 3.7 AND ipv4 only; on "client" side set this "server" as remote; hardcode VxlanId/ip/MTU etc...;; Do not use this in production environment ; just for fun.
package main
import (
"github.com/songgao/water"
"net"
"fmt"
"os"
"os/signal"
"syscall"
"unsafe"
@warriorpaw
warriorpaw / main.go
Last active October 30, 2022 10:12
vxlan package mix up to fool some distributed deep packet inspection ;; Just for fun
package main
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"crypto/hmac"
"crypto/rand"
"crypto/sha256"
"encoding/binary"
--- openvpn-2.2.2.orig/options.c 2011-12-14 00:58:56.000000000 +0800
+++ openvpn-2.2.2/options.c 2012-12-21 10:44:57.683130505 +0800
@@ -54,6 +54,10 @@
#include "memdbg.h"
+extern char* _socket_obfs_salt;
+extern int _socket_obfs_salt_len;
+extern int _socket_obfs_padlen;
+
--- openvpn-2.2.2.orig/options.c 2011-12-14 00:58:56.000000000 +0800
+++ openvpn-2.2.2/options.c 2012-12-21 10:44:57.683130505 +0800
@@ -54,6 +54,10 @@
#include "memdbg.h"
+extern char* _socket_obfs_salt;
+extern int _socket_obfs_salt_len;
+extern int _socket_obfs_padlen;
+