Skip to content

Instantly share code, notes, and snippets.

View ajinabraham's full-sized avatar

Ajin Abraham ajinabraham

View GitHub Profile
@ajinabraham
ajinabraham / digital_ocean_snaphot.py
Last active June 28, 2018 06:22
Periodic Digital Ocean Snapshot is cheaper than Backups
import time
import datetime
import digitalocean
TOKEN = "**"
SERVERS = {**: "**", **: "**"}
def snapshot_backup():
manager = digitalocean.Manager(token=TOKEN)
my_droplets = manager.get_all_droplets()
@ajinabraham
ajinabraham / sign.js
Last active January 11, 2023 15:44
Node.js Digital Signature - Sign
//Create Private Key with OpenSSL
//openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:4096 -pkeyopt rsa_keygen_pubexp:3 -out privateKey.pem
//Generate Public Key to be used at the client side (Mobile)
//openssl pkey -in privateKey.pem -out publicKey.pem -pubout
const crypto = require('crypto')
const fs = require('fs')
const private_key = fs.readFileSync('digital_sign/privateKey.pem', 'utf-8')
//File to be signed
const package = fs.readFileSync('webpackage.zip')
from psutil import process_iter, NoSuchProcess
from signal import SIGTERM, SIGKILL
def kill_proxy_process(port):
"""Kill 'em all"""
for proc in process_iter():
try:
pinfo = proc.as_dict()
except NoSuchProcess:
@ajinabraham
ajinabraham / trust-manager.js
Created September 30, 2017 13:15 — forked from oleavr/trust-manager.js
How to implement an X509TrustManager using Frida
'use strict';
var TrustManager;
var manager;
Java.perform(function () {
var X509TrustManager = Java.use('javax.net.ssl.X509TrustManager');
TrustManager = Java.registerClass({
name: 'com.example.TrustManager',
@ajinabraham
ajinabraham / infosec_newbie.md
Created August 10, 2017 10:37 — forked from mubix/infosec_newbie.md
How to start in Infosec
@ajinabraham
ajinabraham / Good CipherSuites Ordering.txt
Created July 24, 2015 12:38
Good CipherSuites Ordering
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA
TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
import SimpleHTTPServer
class CORSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def send_head(self):
"""Common code for GET and HEAD commands.
This sends the response code and MIME headers.
Return value is either a file object (which has to be copied
to the outputfile by the caller unless the command was HEAD,
and must be closed by the caller under all circumstances), or
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.Signature;
public class TamperCheck {
//we store the hash of the signture for a little more protection
private static final String APP_SIGNATURE = "1038C0E34658923C4192E61B16846";

Keybase proof

I hereby claim:

  • I am ajinabraham on github.
  • I am ajinabraham (https://keybase.io/ajinabraham) on keybase.
  • I have a public key whose fingerprint is 2E56 D8BC 3FBB EF1E 3641 1700 D6D7 1209 1CA3 D45A

To claim this, I am signing this object:

@ajinabraham
ajinabraham / gifjs.asm
Last active November 16, 2023 07:20
A Valid GIF and JS file
; a hand-made GIF containing valid JavaScript code
; abusing header to start a JavaScript comment
; inspired by Saumil Shah's Deadly Pixels presentation
; Ange Albertini, BSD Licence 2013
; yamal gifjs.asm -o img.gif
WIDTH equ 10799 ; equivalent to 2f2a, which is '/*' in ASCII, thus starting an opening comment