Skip to content

Instantly share code, notes, and snippets.

View litao3rd's full-sized avatar
😴
Focusing

litao3rd litao3rd

😴
Focusing
View GitHub Profile
@litao3rd
litao3rd / firewall-v2ray.sh
Last active July 8, 2022 10:23
a small script that add v2ray firewall rules for FIREWALLD that use by firewall-cmd tool on CentOS7
# I buy a fresh VPS from linode with CentOS7 OS. But unfortunally all network connections are blocked by default `iptables` rules except `ssh`.
# All connections that try to connect the VPS will get the error `no route to host` or `Network is unreachable.`. Hope this error message would remind people that there are a huge of annoying firewall rules block your connections.
# Attention:
# I configure my v2ray listen on the port 9200.
# I use vmess protocol with dynamic ports. The dynamic range from 9201 to 9299.
# Here is the script that I configure `iptables` rules with `firewall-cmd` on CentOS7.
#!/bin/bash
@litao3rd
litao3rd / kafkf.py
Last active March 13, 2019 03:35
gits for confluent_kafa consumer
"""
>>> import confluent_kafka
>>> confluent_kafka.version()
('0.11.6', 722432)
>>> confluent_kafka.libversion()
('1.0.0-RC7-6-g9695c0-dirty', 16777471)
"""
@litao3rd
litao3rd / cycle.c
Created June 6, 2016 07:31
This is a C-style code for part of one crackme cycle.exe
// This is a C-style code for part of one crackme cycle.exe
// crackme download address: http://bbs.pediy.com/attachment.php?attachmentid=503&d=1139931299
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static unsigned int dword_402182 = 0xfedcba98;
static int gather_byte_msb(unsigned int value)
{