Skip to content

Instantly share code, notes, and snippets.

Bob Burns BobBurns

Block or report user

Report or block BobBurns

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@BobBurns
BobBurns / blinky.s
Created Jul 31, 2015
blink led on stm32 L1 Discovery with ARM assembly
View blinky.s
@ lets try to blink an LED on the discovery stm32 L1 board
@ uses LED on PB7
@ how to compile and flash:
@ arm-none-eabi-as -mcpu=cortex-m3 blinky.s -o blinky.o
@ arm-none-eabi-ld -v -T stm32.ld -nostartfiles -o blinky.elf blinky.o
@ arm-none-eabi-objcopy -O binary blinky.elf blinky.bin
@ then from st-link (https://github.com/texane/stlink)
@ ./st-flash write ../first_arm/blinky.bin 0x08000000
.thumb
@BobBurns
BobBurns / helloInterrupt.asm
Created Nov 22, 2014
AVR Interrupts. Assembly version of Elliot Williams helloInterrupts.c
View helloInterrupt.asm
;Interrupt 0 Example
; Flashes LED0 at a fixed rate, interrupting whenever button is pressed
;
.device atmega 168
.def temp = r16
.def temp2 = r17
.org 0
;
;Interrupt Vector Table
jmp reset
@BobBurns
BobBurns / debouncer.asm
Created Nov 20, 2014
AVR Assembly simple debouncer
View debouncer.asm
;example program using debouncing
;from AVR Programming by Elliot Williams p.115
;
;compile with gavrasm debouncer.asm
;flash with avrdude -c avrisp -p m168 -P /dev/tty.usbmodem1411 -b 19200 -U flash:w:debouncer.hex
;
.def temp = r16
.device atmega168
;--- inits ---
.def b_pressed = r17
@BobBurns
BobBurns / cwtest.go
Last active Jan 1, 2018
Example of pushing disk and cpu metrics to AWS Cloudwatch
View cwtest.go
/* quick and dirty code to play around pushing
* aws metrics to cloudwatch
*/
package main
import (
"bufio"
"time"
"fmt"
@BobBurns
BobBurns / sockpay.c
Created Oct 3, 2017
fun payload for process infection
View sockpay.c
/* compile:
* gcc -fpic -pie -nostdlib sockpay.c -o sockpay
* use with https://github.com/BobBurns/hijack-process
* create a listener with nc -l -p 4444
*/
long _write(long fd, char *buf, unsigned long len)
{
long ret;
@BobBurns
BobBurns / hloop.go
Last active Sep 21, 2017
trying to trace golang program with ptrace from Learning Linux Binary Analysis by Elfmaster Ryan O'Neill
View hloop.go
package main
import (
"fmt"
"time"
)
func print_hello(str string) {
fmt.Println("hello", str)
}
@BobBurns
BobBurns / aws_check_nrpe.php
Last active Oct 15, 2016
Php wrapper script that can be used for nagios checks with an AWS ec2 instance
View aws_check_nrpe.php
#!/usr/bin/php
<?php
# see https://gist.github.com/BobBurns/bc16d6e45fc01e61138f026c18187b00
# for a more efficient script using the aws php sdk
# wrapper script that can be used for nagios checks with aws ec2 instance
#
# Must have Instance Id $dim_value
@BobBurns
BobBurns / cloudwatch_nrpe.php
Created Oct 15, 2016
Nagios plugin to check AWS Cloudwatch Metrics with AWS PHP SDK
View cloudwatch_nrpe.php
#!/usr/bin/php
<?php
# php script to get aws cloudwatch data and format output
# for nagios check
# can be expanded to get Metrics from all AWS namespaces
# requires aws cli configured and aws sdk for php
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
@BobBurns
BobBurns / lfsr6x5.c
Created Jan 9, 2016
Understanding Cryptography 2.11
View lfsr6x5.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define STREAM (256 * 8)
/* short program to understand linear feed shift register
* and its use in stream ciphers.
*
* modified to solve problem 2.11 in Understanding Cryptography by C. Paar
@BobBurns
BobBurns / lfsr.c
Created Jan 8, 2016
Linear feed shift register in C with 8 bits
View lfsr.c
#include <stdio.h>
#include <stdlib.h>
#define STREAM (256 * 8)
/* short program to understand linear feed shift register
* and its use in stream ciphers.
*/
int
You can’t perform that action at this time.