Skip to content

Instantly share code, notes, and snippets.

View captain-woof's full-sized avatar
🤔

Sohail Saha captain-woof

🤔
View GitHub Profile
@captain-woof
captain-woof / react-intersection-revealer-quick-start.js
Created September 26, 2021 09:49
React Intersection Revealer Quick Start Example
import React, {useRef} from 'react'
import {useIntersectionRevealer} from 'react-intersection-revealer'
export default function YourAwesomeComponent(){
const ref = useRef()
const {heightVisible} = useIntersectionRevealer(ref)
return(
<>
<div className="need-to-track" ref={ref}>...</div>
@captain-woof
captain-woof / react-waterfall-grid-example.js
Created August 31, 2021 18:03
React Waterfall Grid example
import styled from 'styled-components'
import {WaterfallGrid} from 'react-waterfall-grid'
import { useMediaQuery } from 'react-responsive'
// You are free to add as many grid contents as you want. Here, you see only 4 pictures.
import Image1 from './static/images/1.jpg'
import Image2 from './static/images/2.jpg'
import Image3 from './static/images/3.jpg'
import Image4 from './static/images/4.jpg'
@captain-woof
captain-woof / htb-flippin-bank-solution.py
Created July 13, 2021 19:43
HackTheBox Flippin Bank Solution
from pwn.toplevel import remote, log
# Get ciphertext from encryption oracle for chosen username and password, and submit
# ciphertext as solution optionally
def get_username_password_ciphertext(username,password,ciphertext_to_submit = None):
r = remote(host,port)
r.sendafter("username: ",username)
r.sendafter("password: ",password)
r.recvuntil("Leaked ciphertext: ")
ciphertext = r.recvline().decode().rstrip()
#!/usr/bin/python3
from pwn import *
from time import time
import sys
from random import randint
if len(sys.argv) != 2:
warn("Usage: {} <local|remote>".format(sys.argv[0]))
exit(0)
else:
#include<stdio.h>
#include<time.h>
/* gcc -m32 -o sequence-generator sequence-generator.c */
/* Usage: ./sequence-generator [unix-time] */
int main(int argc, char* argv[]){
time_t seed;
if(argc == 1){
seed = time(0);
main(){
unsigned int random;
int answer;
/* CODE TO PRINT BANNER */
/* Seeding rand() with the current unix time below */
time_t seed = time(0);
srand(seed);
/* Loop that checks for correctness of user's guesses */
for(int i=1; i<=30; i++){
#!/usr/bin/python3
from pwn import *
# Prologue
context.log_level = 'error'
elf = ELF('./vuln')
context.log_level = 'info'
host,port = "jupiter.challenges.picoctf.org",13610
proc = remote(host,port)
#!/usr/bin/python3
from pwn import *
import sys
if len(sys.argv) != 2:
warn("Usage: {} binary_filename".format(sys.argv[0]))
exit(0)
filename = sys.argv[1]
#!/usr/bin/python3
from pwn import *
from queue import Queue
from threading import Thread
host,port = "jupiter.challenges.picoctf.org",13610
elf = ELF('./vuln')
class Guesser:
@captain-woof
captain-woof / tryhackme-anonymous_playground-get_root.py
Last active October 21, 2021 18:27
TryHackMe - Anonymous Playground - Exploit Code
#!/usr/bin/python3
from pwn import *
import sys
# Checking argument
if len(sys.argv) != 2:
print("Usage: " + sys.argv[0] + " target")
exit(0)