This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func print_hello(str string) { | |
fmt.Println("hello", str) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
/* quick program to solve affine cipher with key a, b mod 26 */ | |
/* usage: ./aff_c <key a> <key b> <optional e=encrypt> | |
* cipher-text from stdin or pipe | |
*/ | |
int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
/* Rijndael Field S-box transformation | |
* part of the AES encryption algorythm or Rijndal's block cipher. | |
* | |
* code expanded on blog @ www.samiam/galois.html | |
*/ | |
/* global vars */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
/* program to demonstrate how to find multiplicative inverse in Rijndal's Galois Field | |
* part of the AES encryption algorithm or Rijndal's block cipher. | |
* | |
* code expanded on blog @ www.samiam/galois.html | |
*/ | |
/* global vars */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ program: systick_tst.s | |
@ programmer: reb | |
@ device: stm32L152c discovery eval board | |
@ description: blink led with systick count down | |
@ uses systick interrupt routine | |
@ | |
@ how to compile and flash: | |
@ arm-none-eabi-as -mcpu=cortex-m3 systick_tst.s -o systick_tst.o | |
@ arm-none-eabi-ld -v -T stm32.ld -nostartfiles -o systick_tst.elf systick_tst.o | |
@ arm-none-eabi-objcopy -O binary systick_tst.elf systick_tst.bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ cylon eyes for stm32L discovery | |
@ uses lcd software driver 1/4 duty 1/3 bias | |
@ how to compile and flash: | |
@ arm-none-eabi-as -mcpu=cortex-m3 cylon_eyes.s -o cylon_eyes.o | |
@ arm-none-eabi-ld -v -T stm32.ld -nostartfiles -o cylon_eyes.elf cylon_eyes.o | |
@ arm-none-eabi-objcopy -O binary cylon_eyes.elf cylon_eyes.bin | |
@ then from st-link (https://github.com/texane/stlink) | |
@ ./st-flash write ../first_arm/cylon_eyes.bin 0x08000000 | |
.thumb |