Skip to content

Instantly share code, notes, and snippets.

View mosajjal's full-sized avatar
🎯
Focusing

Ali mosajjal

🎯
Focusing
  • Spark New Zealand
  • Auckland, Aotearoa
  • 21:15 (UTC +12:00)
  • X @_n0p_
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mosajjal on github.
  • I am mosajjal (https://keybase.io/mosajjal) on keybase.
  • I have a public key whose fingerprint is E415 3814 4031 B126 D0D0 27E9 1031 8708 42DE F016

To claim this, I am signing this object:

@mosajjal
mosajjal / extract.py
Last active March 10, 2019 11:11
Get fresh SOCKS5 Iran proxies for Hotgram
MOVED HERE:
https://github.com/mosajjal/HotgramSOCKS
#!/bin/env python
import argparse
import base64
import hashlib
import os
import struct
import sys
from binascii import hexlify, unhexlify
@mosajjal
mosajjal / pproxy.alpine
Created February 15, 2020 00:06
pproxy service template
#!/sbin/openrc-run
name=$RC_SVCNAME
command="/opt/pproxy/bin/pproxy"
command_args="-l http+socks4+socks5://:8080 -v"
command_user="nobody"
pidfile="/run/$RC_SVCNAME.pid"
start_stop_daemon_args=""
command_background="yes"
#!/usr/bin/env bash
LINE=$(printf '%0.s=' $(seq 1 ${COLUMNS:-$(tput cols)}))
BLD="\e[1m" #Bold
BLK="\e[5m" #Blink
YLW="\e[33m" #Yellow Text
GRN="\e[32m" #Green Text
RED="\e[31m" #Red Text
YLWBG="\e[43m" #Yellow Background
@mosajjal
mosajjal / sslmate.sh
Last active February 22, 2020 10:26
CertSpotter -- Certificate Transparency Monitor by SSLMate Bash client with curl and jq
#!/usr/bin/env bash
#title :sslmate.sh
#description :This script will look for transparency logs and shows the JSON output
#author :Ali Mosajjal
#date :20200222
#version :0.1
#usage :bash sslmate.sh --domain YOURDOMA.IN --apikey APIKEY_FROM_SSLMATE --subdomains true/false
#notes :Install curl and jq to use this script.
#bash_version :5.0.16(1)-release
@mosajjal
mosajjal / dnschatserver.py
Created February 22, 2020 10:16
DNS Chat server
import socket
from dnslib import RR, QTYPE, DNSRecord, DNSHeader, TXT
from time import time
DOMAIN = "REPLACE_WITH_YOUR_SUBDOMAIN"
def parse_response(data):
temp = DNSRecord.parse(data)
req = str(temp.q.qname)
subdomain = req.replace(DOMAIN, "")
@mosajjal
mosajjal / tmux.conf
Last active June 2, 2020 00:12
my Tmux conf
set -s escape-time 0
setw -g aggressive-resize on
# First remove *all* keybindings
# unbind-key -a
# List keys
bind-key ? list-keys
# Copy mode
def flatten_dict(in_, joiner="."):
out = dict()
retry = 0
for item in in_:
if type(in_[item]) == list:
retry = 1
for i,list_item in enumerate(in_[item]):
out[f"{item}{joiner}{i}"] = in_[item][i]
elif type(in_[item]) == dict:
retry = 1
@mosajjal
mosajjal / cloudflare_tailscale_sync.py
Created August 22, 2021 11:04
Automated Script to Use Cloudflare as a DNS server for Tailscale. Global alternative to Magic DNS
"""
This script trys to add and delete records from cloudflare based on the current status of the account in tailscale, and eliminate the need for TailScale's magic DNS.
Each domain will be created under a subdomain "SUBDOMAIN", that way it'll be easier to find and detele records.
IMPORTANT: this script is not very well tested and it tries to DELETE some DNS records. Use it at your own risk, especially if your SUBDOMAIN value is generic and it's also used elsewhere in your domain.
"""
import os
import requests