Skip to content

Instantly share code, notes, and snippets.

View shahril96's full-sized avatar
🐢

Mohd Shahril shahril96

🐢
View GitHub Profile
@shahril96
shahril96 / keyboard_pcap.py
Last active October 31, 2019 20:18
Python solution for solving PicoCTF 2017 - Just Keyp Trying
"""
shahril:pico$ python keyboard_pcap.py -f data.pcap
flag{pr355_0nwards_a4263f07}c
"""
from scapy.all import *
from argparse import ArgumentParser
from sys import argv
from collections import OrderedDict
@shahril96
shahril96 / collision.py
Last active October 15, 2019 16:42
Generate valid input (printable) for pwnable.kr's collision
import struct
from z3 import *
p = [BitVec('p{}'.format(i), 32) for i in range(5)]
s = Solver()
for a in p:
for i in range(4):
s.add(((a >> i*8) & 0xff) >= 0x30)
s.add(((a >> i*8) & 0xff) <= 0x7a)
@shahril96
shahril96 / bstree.cpp
Last active April 15, 2019 07:11
Ayam implementation of Binary Search Tree in C++
/*
* Ayam implementation of Binary Search Tree
*
* references :-
* https://en.wikipedia.org/wiki/Binary_search_tree
* http://geeksquiz.com/binary-search-tree-set-2-delete/
*
* ~ not very descriptive compile guide (linux) ~
* $ g++ bstree.cpp -o bstree -std=c++11
@shahril96
shahril96 / hashcat-benchmark-rtx2080ti.txt
Created February 26, 2019 11:48
Hashcat Benchmark - 2x RTX 2080 Ti
MEMORY: 62.6 GiB
PROCESSOR: Intel® Core™ i9-7920X CPU @ 2.90GHz × 24
GRAPHICS: GeForce RTX 2080 Ti/PCIe/SSE2 x2
DISK: 1.8TB SSD + 1TB NVMe SSD + 3TB HDD
@shahril96
shahril96 / faggot.py
Created December 10, 2018 10:57
POC for Wargames.my 2018's faggot2.0 challenge
from pwn import *
context.terminal = ['konsole', '-e', 'sh', '-c']
def split2len(s, n):
def _f(s, n):
while s:
yield s[:n]
s = s[n:]
return list(_f(s, n))
#!/usr/bin/env bash
if (( $EUID != 0 )); then
echo "Please run as root"
exit
fi
# clear existing iptables
iptables -X
iptables -F
@shahril96
shahril96 / tint2rc
Last active November 10, 2018 08:51
very simple tint2 configuration
#---- Generated by tint2conf cab8 ----
# See https://gitlab.com/o9000/tint2/wikis/Configure for
# full documentation of the configuration options.
#-------------------------------------
# Gradients
#-------------------------------------
# Backgrounds
# Background 1: Launcher, Panel
rounded = 0
border_width = 0
@shahril96
shahril96 / menu.xml
Created November 10, 2018 02:06
obmenu configuration
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu>
<menu id="root-menu" label="OpenBox 3" execute="/usr/bin/obmenu-generator -i">
</menu>
</openbox_menu>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shahril96
shahril96 / A.py
Created May 12, 2018 14:33
eat.code.error.cry.repeat's (some) solutions for ACM ICPC Al-Khawarizmi 2018
while True:
N, M = map(int, input().split())
if N == 0 and M == 0:
break
table = [i for i in range(1, N+1)]