Skip to content

Instantly share code, notes, and snippets.

View hexorer's full-sized avatar

Mohsen Mirkarimi hexorer

View GitHub Profile
@hexorer
hexorer / main.cpp
Created February 6, 2021 22:08
a simple Priority Queue implementation in C++
#include <iostream>
#include "pqueue.hpp"
int main() {
PriorityQueue<int*> q{};
for (int i=0; i < 12; i++) {
std::printf("%d, first\n", i);
q.push(i, new int{i});
@hexorer
hexorer / bench.cpp
Last active February 9, 2021 09:11
a simple implementation of Priority Queue using std::vector and std::queue
#include <iostream>
#include <vector>
#include <benchmark/benchmark.h>
#include "squeue.hpp"
#define COUNT_I 1000
#define COUNT_J 10
from pwn import *
context.arch = 'amd64'
context.os = 'linux'
def exploit(p, libc, pop_rdi_offset, xor_rax_offset, local):
p.recv()
# pop_rdi_offset = ROP(libc).find_gadget(['pop rdi', 'ret'])
@hexorer
hexorer / graph_draft.hpp
Created January 26, 2022 18:13
A Draft showing how libgvizard's graph class' public is gonna be...
#ifndef GVIZARD_GRAPH_GRAPH_HPP_
#define GVIZARD_GRAPH_GRAPH_HPP_
#include <cstddef>
#include <optional>
#include <type_traits>
#include <variant>
#include "gvizard/registry/attrset.hpp"
#include "gvizard/registry/attrset_registry.hpp"