ttorification - scripts - random scripts
 (HTM) git clone git://parazyd.org/scripts.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
       ---
 (DIR) commit 9bb66a8b42e50d5094d14abb3fecd1f37e834cac
 (DIR) parent 61c159ab805636b3acc3793a6361fddfd467355a
 (HTM) Author: parazyd <parazyd@dyne.org>
       Date:   Fri, 17 Mar 2017 23:53:49 +0100
       
       ttorification
       
       Diffstat:
         M blackholedns                        |       3 ++-
         M catfact                             |       4 +++-
         R scan_domains.py -> notinpath/scan_… |       0 
         R skrot -> obsolete/skrot             |       0 
         R translate -> obsolete/translate     |       0 
         M sslget                              |       4 +++-
         M ticker                              |       5 +++--
         M update-gits                         |      10 ++++++----
         M ys                                  |       4 +++-
       
       9 files changed, 20 insertions(+), 10 deletions(-)
       ---
 (DIR) diff --git a/blackholedns b/blackholedns
       t@@ -7,8 +7,9 @@
        # unbound:
        #         include: "/etc/unbound/blackhole.dns"
        
       +[ -n "$TORIFY" ] && proxy="--proxy socks5://127.0.0.1:9050"
        
       -urls="$(curl -s http://someonewhocares.org/hosts/hosts)"
       +urls="$(curl -s ${proxy} http://someonewhocares.org/hosts/hosts)"
        
        [ -n "$urls" ] || exit 1
        
 (DIR) diff --git a/catfact b/catfact
       t@@ -1,3 +1,5 @@
        #!/bin/sh
        
       -curl -s http://catfacts-api.appspot.com/api/facts | jq -r '.facts[]'
       +[ -n "$TORIFY" ] && proxy="--proxy socks5://127.0.0.1:9050"
       +
       +curl -s ${proxy} http://catfacts-api.appspot.com/api/facts | jq -r '.facts[]'
 (DIR) diff --git a/scan_domains.py b/notinpath/scan_domains.py
 (DIR) diff --git a/skrot b/obsolete/skrot
 (DIR) diff --git a/translate b/obsolete/translate
 (DIR) diff --git a/sslget b/sslget
       t@@ -3,8 +3,10 @@
        # retrieve SSL certificate of a website
        # it assumes 443 to be the default SSL port
        
       +[ -n "$TORIFY" ] && tor=torsocks
       +
        portnum=${2-443}
       -cert="$(echo | openssl s_client -connect $1:$portnum 2>&1 | sed '/BEGIN CERT/,/END CERT/p;d')"
       +cert="$(echo | ${tor} openssl s_client -connect $1:$portnum 2>&1 | sed '/BEGIN CERT/,/END CERT/p;d')"
        
        printf "%s\n" "$cert"
        
 (DIR) diff --git a/ticker b/ticker
       t@@ -1,12 +1,13 @@
        #!/bin/sh
        
       -jsonurl="http://api.bitcoincharts.com/v1/markets.json"
       +[ -n "$TORIFY" ] && proxy="--proxy socks5://127.0.0.1:9050"
        
       +jsonurl="http://api.bitcoincharts.com/v1/markets.json"
        jsonfile=/tmp/bitcoincharts.json
        
        [ $(stat --format=%Y $jsonfile) -gt $(( $(date +%s) - 900 )) ] || {
                printf "curling...\n"
       -        curl -s "$jsonurl" > "$jsonfile"
       +        curl ${proxy} -s "$jsonurl" > "$jsonfile"
        }
        
        parse() {
 (DIR) diff --git a/update-gits b/update-gits
       t@@ -1,10 +1,12 @@
        #!/bin/sh
        
       +[ -n "$TORIFY" ] && tor=torsocks
       +
        for i in $(printf %s\\n */); do
       -        cd "$i"
       -        test -d .git && {
       +        test -d "$i/.git" && {
       +                cd "$i"
                        printf "\nupdating %s...\\n" "$i"
       -                git pull origin master
       +                ${tor} git pull origin master
       +                cd - >/dev/null
                }
       -        cd - >/dev/null
        done
 (DIR) diff --git a/ys b/ys
       t@@ -3,6 +3,8 @@
        # 2f30
        # search youtube via api
        
       +[ -n "$TORIFY" ] && proxy="--proxy socks5://127.0.0.1:9050"
       +
        KEY="AIzaSyAa5gAarPnuu9zTVjpp6mPyStbY17uuhSE"
        NRES=10
        
       t@@ -17,7 +19,7 @@ search() {
                        sstr=$1
                fi
        
       -        json="$(curl -s \
       +        json="$(curl -s ${proxy} \
                        -G "https://www.googleapis.com/youtube/v3/search" \
                        -d part="snippet" \
                        -d q=$sstr \