diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1944fd6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.tmp diff --git a/.slrp/bin/check_for_live.sh b/.slrp/bin/check_for_live.sh new file mode 100644 index 0000000..dc34a37 --- /dev/null +++ b/.slrp/bin/check_for_live.sh @@ -0,0 +1,6 @@ +SLRP=$PWD/.slrp +BIN=$SLRP/bin +while true +do +$BIN/mubeng -f "$SLRP/proxies.txt" --output "$SLRP/live.txt" --check 2>/dev/null; +done diff --git a/.slrp/bin/clean.sh b/.slrp/bin/clean.sh new file mode 100644 index 0000000..90c95d2 --- /dev/null +++ b/.slrp/bin/clean.sh @@ -0,0 +1,6 @@ +SLRP=$PWD/.slrp +killall screen +rm -f $SLRP/proxies.txt +rm -f $SLRP/proxies.tmp +rm -f $SLRP/live.txt +rm -rf $SLRP/data diff --git a/.slrp/bin/mubeng b/.slrp/bin/mubeng new file mode 100644 index 0000000..dd52b30 Binary files /dev/null and b/.slrp/bin/mubeng differ diff --git a/.slrp/bin/parse_pool_json.sh b/.slrp/bin/parse_pool_json.sh new file mode 100644 index 0000000..8bc6821 --- /dev/null +++ b/.slrp/bin/parse_pool_json.sh @@ -0,0 +1,15 @@ +SLRP=$PWD/.slrp +PROXY_FILE=$SLRP/proxies.txt; +TEMP=$SLRP/proxies.tmp; +while true; + do + curl -s http://localhost:8089/api/pool | jq '.Records[] | .Proxy' | sed s/\"//g > $TEMP; + if [ ! -s $TEMP ] + then + echo "Nothing at the moment"; sleep 2; + else + cat $TEMP > $PROXY_FILE; + echo "updated- sleeping 2 seconds..."; sleep 2; + cat $PROXY_FILE; + fi +done; diff --git a/.slrp/bin/slrp b/.slrp/bin/slrp new file mode 100644 index 0000000..252937f Binary files /dev/null and b/.slrp/bin/slrp differ diff --git a/.slrp/config.yml b/.slrp/config.yml new file mode 100644 index 0000000..cd4df97 --- /dev/null +++ b/.slrp/config.yml @@ -0,0 +1,14 @@ +app: + state: $HOME/.slrp/data + sync: 1m +log: + level: info + format: pretty +server: + addr: "127.0.0.1:8089" + read_timeout: 15s +mitm: + addr: "127.0.0.1:8090" + read_timeout: 15s + idle_timeout: 15s + write_timeout: 15s diff --git a/README.md b/README.md new file mode 100644 index 0000000..e5492af --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ +# CRACKHEAD PROXY +This is a hacked crackheaded bullshit amalgamation of a per-request proxy finder and rotator. + +Scrapes the proxy lists included with [slrp](https://github.com/nfx/slrp) and multiplexes them through a local HTTP proxy with [mubeng](https://github.com/kitabisa/mubeng) because slrp alone was not working. + +This was shitcoded while mentally impared. Expect issues. + +## WARNINGS +* About half or so of proxies used will fail, use retries. +* Dont expect privacy on your requests, mitm is possible. +* Dont do crimes + +## INSTALL +`` +sudo apt install jq screen curl +cd ~ +wget +tar xvf +`` +## USE +`` +cd ~/ +./run_d.sh +`` +then run your app with the HTTP proxy `http://localhost:420` +## STOP +`` +Ctrl+C +./kill.sh +`` +## TEST +`` +curl -D - --proxy-insecure -x http://localhost:420 -k https://canhazip.com +`` +or +`` +./test_proxy.sh +`` + + +##PROJECTS USED +###Give them a hot look +* [slrp](https://github.com/nfx/slrp) +* [mubeng](https://github.com/kitabisa/mubeng) +* [jq](https://github.com/jqlang/jq) diff --git a/kill.sh b/kill.sh new file mode 100644 index 0000000..f8200e4 --- /dev/null +++ b/kill.sh @@ -0,0 +1 @@ +sudo .slrp/bin/clean.sh diff --git a/run_d.sh b/run_d.sh new file mode 100644 index 0000000..662f993 --- /dev/null +++ b/run_d.sh @@ -0,0 +1,22 @@ +SLRP_DIR=$PWD/.slrp +BIN=$SLRP_DIR/bin +PROXY_FILE=$SLRP_DIR/proxies.txt +LIVE=$SLRP_DIR/live.txt +DATA=$SLRP_DIR/data +SLRP=$BIN/slrp +PARSE_POOL=$BIN/parse_pool_json.sh +MUBENG=$BIN/mubeng +CHECK_LIVE=$BIN/check_for_live.sh +CLEAN=$BIN/clean.sh + +echo Cleaning up first... +bash $CLEAN +echo Scanning for proxies, please wait 6 seconds... +screen -S slrp -d -m $SLRP +sleep 6; +echo Checking for live proxies and parsing the pool, please wait 90 seconds... #... current time `date +%r` +screen -S parse_pool -d -m $PARSE_POOL +screen -S mubeng_check_live -d -m $CHECK_LIVE +sleep 90 +$MUBENG -t 6s -a localhost:420 -f $LIVE -w -v -r 1 -m random +echo proxy sever on, connect on http://localhost:420 diff --git a/test_proxy.sh b/test_proxy.sh new file mode 100644 index 0000000..2acd452 --- /dev/null +++ b/test_proxy.sh @@ -0,0 +1,5 @@ +while true; +do +curl -D - --proxy-insecure -x http://localhost:420 -k https://canhazip.com +echo "\n" +done