Skip to content

Instantly share code, notes, and snippets.

View xhdix's full-sized avatar
:electron:
:):

xhdix

:electron:
:):
View GitHub Profile

Keybase proof

I hereby claim:

  • I am xhdix on github.
  • I am xhdix (https://keybase.io/xhdix) on keybase.
  • I have a public key whose fingerprint is 3A5B B30E 23ED 4A9B E00A 126D DAFD F2C4 11F7 A37F

To claim this, I am signing this object:

@xhdix
xhdix / atba.sh
Last active July 1, 2019 10:19
android add obfs4 bridges to Tor
#!/data/data/com.termux/files/usr/bin/sh
#android add obfs4 bridges to Tor
echo "" >> $PREFIX/etc/tor/torrc
echo "Bridge obfs4 151.80.7.124:443 71C023CF72CAD644FE0FA04C0EA8F840FD562C30 cert=bar8dxwmy5aM/OsRNIUNlLuipQen/NB1w81YhBIGJl89JiqZ+6uih/k4f3VjqjfJ13x4Gw iat-mode=0" >> $PREFIX/etc/tor/torrc
echo "Bridge obfs4 31.171.155.9:443 4EB24590EE4731BD366E5C2446BDC1FF836FBE69 cert=CWIAYYveoSo8wHLmpyxQ4RiZbckkVyuGmzQHUV1w9LA+8ZjWotDFvJQ3nO9SqmzAhkP8FA iat-mode=0" >> $PREFIX/etc/tor/torrc
echo "...done"
echo "*******************"
echo "***----\$tor----***"
echo "*******************"
@xhdix
xhdix / atb.sh
Last active July 30, 2023 20:57
android Tor+obfs4-bridge installer in Termux
#!/data/data/com.termux/files/usr/bin/sh
#android Tor+bridge installer
## get new bridges from: https://bridges.torproject.org/bridges?transport=obfs4
## and edit with:
####$ vi $PREFIX/etc/tor/torrc
## or
## look sample:
####$ pkg install curl -y
####$ curl -L https://git.io/fjK3Y -o atba.sh
####$ bash ./atba.sh
@xhdix
xhdix / unknown-ips.py
Last active March 30, 2019 16:10
Find the IP that is not related to the server administrator and users. (In journalctl or receive input in the form: [python unknown-ips.py 'cat /var/log/auth.log'] or any other text input)
#!/usr/bin/env python
"""HDME - 19/12/2018"""
import os
import sys
print("begin")
ipvalid = ' |grep -oE "\\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\b"'
if len(sys.argv) > 1:
logsv = os.popen(sys.argv[1] + ipvalid).read().splitlines()
else:
logsv = os.popen('journalctl' +ipvalid).read().splitlines()
@xhdix
xhdix / gddl.sh
Last active August 10, 2018 09:37
Google Drive/Docs any big file downloader
#!/bin/bash
##orginal: https://gist.github.com/iamtekeste/3cdfd0366ebfd2c0d805#gistcomment-2359248
##alternative: https://jl-workshop.com/Cloud-Storage-Direct-Link-Generator/
##command:
## bash gddl.sh subdomain_name(drive|docs) long_google_drive_file_id filename.ext
CONFIRM=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate "https://$1.google.com/uc?export=download&id=$2" -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')
wget --load-cookies /tmp/cookies.txt "https://$1.google.com/uc?export=download&confirm=$CONFIRM&id=$2" -O $3
rm -rf /tmp/cookies.txt