Skip to content

Instantly share code, notes, and snippets.

@cachefiles
cachefiles / exclude_route.c
Created July 28, 2017 05:16
exclude route cacalate
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
int _net_count = 0;
int _net_pref[25600];
#!/bin/bash
iptables-save -t mangle |grep EBESUCHER|sed "s/-A UNETVPN/-D UNETVPN/g"|xargs -d "\n" -n 1 echo iptables -w -t mangle | bash > /dev/null
if ! [ -f /tmp/count.txt ]; then
echo -n 0 > /tmp/count.txt;
fi;
COUNT=$(cat /tmp/count.txt);
DATE=$(date "+%D %H:%M:%S")
@cachefiles
cachefiles / build.php
Last active January 8, 2017 15:25
openwrt build daemon for build machine
<html>
<head>
</head>
<body>
<?php
function is_web_url($url)
{
return preg_match('/^[a-zA-Z0-9_:\\/.-]*$/', $url) > 0;
}
@cachefiles
cachefiles / build_openwrt.sh
Created January 8, 2017 11:59
openwrt build script for dnsfix
#!/bin/bash
tmpdir=$(pwd)/$(mktemp -d build_openwrt_XXXX)
sdkurl=http://downloads.openwrt.org/latest/adm8668/generic/OpenWrt-SDK-15.05.1-adm8668_gcc-4.8-linaro_uClibc-0.9.33.2.Linux-x86_64.tar.bz2
wget -O - $sdkurl | tar xjf - -C $tmpdir
sdkdir=$tmpdir/$(ls $tmpdir)
git clone --recursive https://github.com/cachefiles/dnsfix $sdkdir/package/dnsfix
fakedn ".4tern.com"
fakedn ".github.com"
fakedn ".85.17.73.31"
fakedn ".adorama.com"
fakedn ".agnesb.fr"
fakedn ".akiba-web.com"
fakedn ".alien-ufos.com"
fakedn ".altrec.com"
fakedn ".asianspiss.com"
fakedn ".athenaeizou.com"