Skip to content

Instantly share code, notes, and snippets.

Avatar

Jasper Lievisse Adriaanse jasperla

View GitHub Profile
View test_tls.py.diff
diff --git a/tests/unit/modules/test_tls.py b/tests/unit/modules/test_tls.py
index 419cddd056..614963ccfb 100644
--- a/tests/unit/modules/test_tls.py
+++ b/tests/unit/modules/test_tls.py
@@ -7,6 +7,7 @@ from __future__ import absolute_import, print_function, unicode_literals
# Import Python libs
import logging
+import os
View z3_test.py
#!/usr/bin/env python3
#
# https://z3prover.github.io/api/html/namespacez3py.html
# https://ericpony.github.io/z3py-tutorial/guide-examples.htm
import sys
from z3 import *
def add_constraints(solver, badbytes, *vars):
View bytes.py
#!/usr/bin/env python3
badbytes = b'\x00\x0a\x0d\x0f\x14\x15\x5c\x2f\x3a\xff'
print(f'badbytes raw = {badbytes}')
print('individual bad bytes as hex = ', end='')
[print(hex(x), end=' ') for x in badbytes]
print()
# Declare block explicitly as bytes:
View generate-venetian-nops.py
#!/usr/bin/env python3
import subprocess
import sys
for i in range(0x00, 0xff+1):
opcodes = '00' + str(hex(i)).replace('0x', '').rjust(2, '0') + '00'
cmd = ['rasm2', '-a', 'x86', '-b', '32', '-d', opcodes]
View badchars.py
#!/usr/bin/env python3
import argparse
# Using mona.py to find the badbytes with unicode:
# !mona cmp -r $REG -f c:\all_chars_unicode.bin
# then use 'xxd -s $offset all_chars.bin' to find the actual byte matching the offset.
def main():
parser = argparse.ArgumentParser()
View write.nasm
; nasm -D OpenBSD -f elf64 exit.nasm -o exit.o && ld.bfd -nopie -e _start exit.o -o exit && ./exit ; echo $?
%ifdef OpenBSD
section .note.openbsd.ident
align 2
dd 8,4,1
db "OpenBSD",0
dd 0
align 2
View list_tags.py
#!/usr/bin/env python3
#
# quick-n-dirty script to download all tags for a given registry.
# Might come in handy when trawling Shodan.
import json
import requests
from urllib3.exceptions import InsecureRequestWarning
View main.rs
use std::io::prelude::*;
use std::net::TcpStream;
use crossbeam_channel::{unbounded, Receiver, Sender};
use crossbeam_utils::thread;
use rand::prelude::*;
use std::time::Duration;
pub type Msg = Box<u8>;
View output
Traceback (most recent call last):
File "/Users/jasperla/hack/salt/salt/tests/unit/modules/test_state.py", line 376, in test_low
"name": "vi"}), list)
File "/Users/jasperla/hack/salt/salt/salt/modules/state.py", line 448, in low
st_ = salt.state.State(__opts__, proxy=__proxy__)
File "/Users/jasperla/hack/salt/salt/salt/state.py", line 727, in __init__
self.opts['pillar'] = self._gather_pillar()
File "/Users/jasperla/hack/salt/salt/salt/state.py", line 784, in _gather_pillar
self.opts['id'],
KeyError: 'id'
View keybase.md

Keybase proof

I hereby claim:

  • I am jasperla on github.
  • I am jasperla (https://keybase.io/jasperla) on keybase.
  • I have a public key ASBslaGc8YMo_4vEOh75AahlCJOKl0qEwNftj7ahtUtsIAo

To claim this, I am signing this object:

You can’t perform that action at this time.