Skip to content

Instantly share code, notes, and snippets.

Avatar

Alice GIRARD zer0tonin

View GitHub Profile
View .zshrc
# 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"
View shell.php
<?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 Feb 18, 2020
Dumb mutex stuff
View main.go
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"sync"
"time"
)
@zer0tonin
zer0tonin / orbit.py
Created Dec 6, 2019
Advent of Code day 6
View orbit.py
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 Dec 5, 2019
Advent of Code day 5
View parser.py
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 Nov 4, 2019
tartiflette-plugin-scalars example
View app.py
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 Sep 18, 2019
Pygithub stubbing
View list_module
github.AuthenticatedUser
github.Authorization
github.AuthorizationApplication
github.Branch
github.BranchProtection
github.Clones
github.Commit
github.CommitCombinedStatus
github.CommitComment
github.CommitStats
View pokedex.json
{
"pikachu": {
"type": "electric",
"abilities": ["static", "lightning rod"]
},
"eevee": {
"type": "normal",
"abilities": ["run away", "adaptability", "anticipation"]
},
"grimer": {
@zer0tonin
zer0tonin / main.go
Created Jun 22, 2019
AES-CBC exploit
View main.go
package main
import (
"encoding/hex"
"fmt"
"os"
"github.com/gdamore/encoding"
)
@zer0tonin
zer0tonin / main.go
Last active Jun 22, 2019
AES-CBC application
View main.go
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/hex"
"fmt"
"io"
"os"
You can’t perform that action at this time.