Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View zer0tonin's full-sized avatar
🏳️‍⚧️

Alice Girard Guittard zer0tonin

🏳️‍⚧️
View GitHub Profile
# If you come from bash you might have to change your $PATH
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="~/.oh-my-zsh"
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="dracula"
@zer0tonin
zer0tonin / shell.php
Created March 9, 2020 08:51
CTF shell
<?php
function featureShell($cmd, $cwd) {
$stdout = array();
if (preg_match("/^\s*cd\s*$/", $cmd)) {
// pass
} elseif (preg_match("/^\s*cd\s+(.+)\s*(2>&1)?$/", $cmd)) {
chdir($cwd);
preg_match("/^\s*cd\s+([^\s]+)\s*(2>&1)?$/", $cmd, $match);
@zer0tonin
zer0tonin / main.go
Created February 18, 2020 16:53
Dumb mutex stuff
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"sync"
"time"
)
@zer0tonin
zer0tonin / orbit.py
Created December 6, 2019 17:49
Advent of Code day 6
class Node:
def __init__(self, value):
self.value = value
self.adjacent = []
def is_santa(self):
return self.value == "SAN"
def is_you(self):
return self.value == "YOU"
@zer0tonin
zer0tonin / parser.py
Created December 5, 2019 16:46
Advent of Code day 5
def param_accessor(instruction, position):
try:
if instruction[-2 - position] == "1":
return lambda pointer, opcodes: opcodes[pointer+position]
except IndexError:
pass
return lambda pointer, opcodes: opcodes[opcodes[pointer+position]]
def op_sum(pointer, opcodes, first_param, second_param):
@zer0tonin
zer0tonin / app.py
Created November 4, 2019 16:54
tartiflette-plugin-scalars example
import asyncio
from ipaddress import ip_address
from tartiflette import Resolver, create_engine
from aiohttp import web
from tartiflette_aiohttp import register_graphql_handlers
@Resolver("Query.ipAddress")
async def resolve_ip_address(parent, args, ctx, info):
@zer0tonin
zer0tonin / list_module
Created September 18, 2019 16:49
Pygithub stubbing
github.AuthenticatedUser
github.Authorization
github.AuthorizationApplication
github.Branch
github.BranchProtection
github.Clones
github.Commit
github.CommitCombinedStatus
github.CommitComment
github.CommitStats
@zer0tonin
zer0tonin / pokedex.json
Created July 28, 2019 13:12
pokemon stuff
{
"pikachu": {
"type": "electric",
"abilities": ["static", "lightning rod"]
},
"eevee": {
"type": "normal",
"abilities": ["run away", "adaptability", "anticipation"]
},
"grimer": {
@zer0tonin
zer0tonin / main.go
Created June 22, 2019 19:26
AES-CBC exploit
package main
import (
"encoding/hex"
"fmt"
"os"
"github.com/gdamore/encoding"
)
@zer0tonin
zer0tonin / main.go
Last active September 13, 2022 01:37
AES-CBC application
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/hex"
"fmt"
"io"
"os"