Skip to content

Instantly share code, notes, and snippets.

@errzey
errzey / sym.sh
Last active Aug 30, 2017
stupid shell script that tries to find a specific symbol in libs.
View sym.sh
#!/usr/bin/env bash
# runs through your ld paths and looks for a symbol
# passed as the first argument
#
# example:
#
# $ ./lz.findsymbol.sh xcb_big_requests_id
# /usr/lib/x86_64-linux-gnu/libcairo.a
# /usr/lib/x86_64-linux-gnu/libxcb.a
@errzey
errzey / example_usage.c
Last active Mar 27, 2017
trx-1 / trx-2 api in one header
View example_usage.c
/*
Output is something like:
ellzey@bluedream ~/Code/libtrx/src ./example
line1:
line2: ALM EBRCS
line3: TGRP psDr
line4: A2D
line5: ALCO Northwest S
line6: RadioID: 2DF98B
View ssbug.md

Lets take a look at the vulnerable code:

if (s->servername_done == 0) {
    switch (servname_type) {
        case TLSEXT_NAMETYPE_host_name:
            if (s->session->tlsext_hostname == NULL) {
                if (len > TLSEXT_MAXLEN_host_name ||
                    ((s->session->tlsext_hostname = OPENSSL_malloc(len + 1)) == NULL)) {
                    *al = TLS1_AD_UNRECOGNIZED_NAME;
@errzey
errzey / simple_elf_crawler.c
Created Sep 19, 2016
ELF section / symbol crawler in 20 lines of code using liblz_elf
View simple_elf_crawler.c
#include <liblz.h>
#include <liblz/lzapi.h>
#include <liblz/lz_elf.h>
static int __print_symbol(lz_elf_symbol * symbol, void * args) {
printf(" Symbol name: %s\n", lz_elf_symbol_get_name(symbol));
return 0;
}
static int __print_section(lz_elf_section * section, void * arg) {
printf("Section name : %s\nSections count: %zu\n", lz_elf_section_get_name(section), lz_elf_section_get_nsyms(section));
@errzey
errzey / EBRCS_p25_phaseII.py
Created Aug 10, 2016
East Bay Regional Communications System TG UID generator. (Moto P25 PhaseII)
View EBRCS_p25_phaseII.py
#!/usr/bin/env python
if __name__ == '__main__':
stuff = {
'Paramedics Plus' : [(3030000, 3030999)],
'Alameda Co SO Consoles' : [(3011000, 3011999)],
'Alameda Co FD Consoles' : [(3013000, 3013999)],
'Alameda Co FD' : [(3035000, 3035999)],
'Alameda PD Console' : [(3088100, 3088199)],
View keybase.md

Keybase proof

I hereby claim:

  • I am ellzey on github.
  • I am strcpy (https://keybase.io/strcpy) on keybase.
  • I have a public key whose fingerprint is D0D6 688E 39FC E3B9 D575 8531 E8DF 9CA0 8131 CBFF

To claim this, I am signing this object:

@errzey
errzey / sidebar-brew.md
Created Oct 27, 2015
fixing brew for sidebar patch
View sidebar-brew.md

The sidebar patch is no longer included in the brew recipe, which sucks.

You can grab the newest patches here: http://www.lunar-linux.org/mutt-sidebar/

Here is how to edit brew to apply the patch without errors:

  • brew edit mutt
  • add option "with-sidebar-patch", "Apply sidebar patch
  • add:
@errzey
errzey / AREADME.md
Last active Aug 29, 2015
Using the libevhtp thrift module
View AREADME.md

Using the libevhtp thrift module

Just copy all this stuff to a directory (compile thrift with the libevhtp module of course first)

mkdir build; cd build; cmake .. ; make
./evhtp_thrift_server &
# if you have SO_REUSEPORT support, you can run multiple times.
./test1_client
@errzey
errzey / gist:472ac7c6c6f3ca09ca94
Created Apr 12, 2015
psuedocode for kernelcorn
View gist:472ac7c6c6f3ca09ca94
struct query {
struct event * r_pipe_ev;
int r_pipe; /* response pipe */
int q_pipe; /* query pipe */
int response[256];
};
static void
read_response(int sock, short events, void * arg) {
struct query * q = (struct query *)arg;
View Evepress.c
evhtpexp app = express();
express_cb_s foocb = onGet(app, "/foo",
func void(evreq r, void * a) {
reply(r, "FOOO");
});
express_cb_s barcb = onGet(app, "/bar",
func void(evreq r, void * a) {
reply(r, "BARRR");