Skip to content

Instantly share code, notes, and snippets.

View MuntashirAkon's full-sized avatar
Unavailable

Muntashir Al-Islam MuntashirAkon

Unavailable
View GitHub Profile
@MuntashirAkon
MuntashirAkon / littlesnitchtoggler.sh
Last active October 7, 2022 03:26
LittleSnitchToggler
#!/bin/bash
#
# LittleSnitchToggler
# Script to enable/disable Little Snitch
# (c) Muntashir Al-Islam
# License: MIT License
#
# Alert if not a root user
@MuntashirAkon
MuntashirAkon / disablespindump.sh
Created November 29, 2017 19:55
DisableSpindump
#!/bin/bash
#
# disablespindump
# Script to disable spindump
#
# (c) Muntashir Al-Islam
# License: MIT License
#
@MuntashirAkon
MuntashirAkon / ebooksites.txt
Created July 9, 2019 14:31
Deceptive Ebook Sites (Can be used with Adblock)
||playperks.net
||allbookserve.org
||bookfreenow.com
||pdfsu.online
||akeybooks.com
||outofprint.cc
||get-ebooks.club
||mybooklibrary.com
||iread-now.com
||recmedia.me
@MuntashirAkon
MuntashirAkon / guide.md
Last active September 22, 2024 20:52
Guide to enable macOS Terminal to respect system proxy

Copy and paste the code below at the beginning of ~/.bash_profile.

export http_proxy=`scutil --proxy | awk '\
  /HTTPEnable/ { enabled = $3; } \
  /HTTPProxy/ { server = $3; } \
  /HTTPPort/ { port = $3; } \
  END { if (enabled == "1") { print "http://" server ":" port; } }'`
export HTTP_PROXY="${http_proxy}"
export https_proxy=`scutil --proxy | awk '\
@MuntashirAkon
MuntashirAkon / mmssms_to_qksms.php
Created April 25, 2020 14:26
Convert mmssms.db to QKSMS compatible json file
<?php
if(!isset($argv[1])){
echo "USAGE: ${argv[0]} <mmssms.db file>\n";
exit(1);
}
$db_file = $argv[1];
$db = new SQLite3($db_file);
$stmt = $db->prepare("SELECT * FROM sms");
@MuntashirAkon
MuntashirAkon / delete_tweet.js
Created May 3, 2020 14:38
Delete all tweets from twitter
// NOTE: This script is far from complete, especially “Likes” section
// https://stackoverflow.com/a/2706236/4147849
function eventFire(el, etype) {
if (el.fireEvent) {
el.fireEvent('on' + etype);
} else {
var evObj = document.createEvent('Events');
evObj.initEvent(etype, true, false);
el.dispatchEvent(evObj);
@MuntashirAkon
MuntashirAkon / ECDH.java
Last active March 25, 2024 12:48 — forked from zcdziura/Crypto Test
Encryption using Elliptic Curves and Diffie-Hellman key exchanges
import java.io.UnsupportedEncodingException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.Key;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
import java.security.PrivateKey;
import java.security.PublicKey;
@MuntashirAkon
MuntashirAkon / hexify.cpp
Created January 29, 2022 17:52
Hexify in C/CPP
// Get a byte array as a hexadecimal character string
int hexify(const uint8_t *in, size_t in_size, char *out, size_t out_size) {
if (in_size == 0 || out_size == 0) return 0;
char map[16+1] = "0123456789ABCDEF";
int bytes_written = 0;
size_t i = 0;
while(i < in_size && (i*2 + (2+1)) <= out_size)
{
@MuntashirAkon
MuntashirAkon / extract_pubkey_hash.sh
Created May 5, 2022 16:29
Get Base64 encoded SHA-256 checksum of a public key from a DER encoded certificate. This is useful for creating certificate pinning on Android. See https://developer.android.com/training/articles/security-config#CertificatePinning
#!/usr/bin/env bash
if [[ "$(uname)" == "Darwin" ]]; then
alias sha256sum="shasum -a 256"
fi
function extract_pubkey_hash() {
openssl x509 -inform der -in "$1" -pubkey -noout | sed -e 's/-----BEGIN PUBLIC KEY-----//' -e 's/-----END PUBLIC KEY-----//' | tr '\n' ',' | sed s/,//g | base64 -d | sha256sum - | awk '{ print $1 }' | xxd -r -p | base64
}
@MuntashirAkon
MuntashirAkon / guidelines.md
Last active July 11, 2023 10:44
Community guidelines for App Manager | Chat

Rules

  1. No PM to the maintainer/moderators without prior permission
  2. No spams, promotions and advertisements of any kind
  3. No NSFW or politics
  4. No crash reports in plain message (save it to a file and upload it)

Recommendations

  1. Keep messages clear and concise