Skip to content

Instantly share code, notes, and snippets.

View iagox86's full-sized avatar

Ron Bowes iagox86

View GitHub Profile
This is my response to Ed Skoudis' challenge, "Santa Claus is Hacking, to Town!"
http://www.ethicalhacker.net/content/view/218/2/
First, a poem that describes the situation and then the solution. Then, the boring part the commands and results in non-poem form.
------------
'twas the night before Christmas and Kris was in jail
And his friends were upset because they couldn't make bail
"202c," they said, "how could that be done?"
"I thought we were in Canada, with 342.1?"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char *argv[])
{
int i;
srand(0x13371337);
unsigned char buffer[4096];
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <unistd.h>
#define rdtsc() ({ uint64_t x; asm volatile("rdtsc" : "=A" (x)); x; })
#define TRIALS 20
char chars[] = "!abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
fn exchange_first_last(a: &str) -> String {
// Convert to a vector so we can change it
let mut out: Vec<char> = a.chars().collect();
// Swap the first and last character
let len = out.len();
out.swap(0, len - 1);
// Convert into a String
out.into_iter().collect()
# fish theme: gentoo
function _git_branch_name
echo (command git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||')
end
function _is_git_dirty
echo (command git status -s --ignore-submodules=dirty ^/dev/null)
end
"This mode of regulating the clock enables me to employ, when
necessary, a little artifice which I find very useful, and
which I will confide to you, reader, on condition however that
you keep it a profound secret, for if once known my expedient
would lose all its effect. When for any reason I desire to
advance or retard the hour of a meal, but secretly pressing a
certain electric button place in my study, I can put forward
or back at pleasure all the clocks, as well as the striking
apparatus. The cook often fancies that the time has passed
somehow very quickly, and I myself have gained a quarter of
scriptencoding utf-8
" To install nvim on ubuntu:
" sudo apt-get install software-properties-common
" sudo add-apt-repository ppa:neovim-ppa/unstable
" sudo apt-get update
" sudo apt-get install neovim
" sudo apt-get install python-dev python-pip python3-dev python3-pip
" sudo update-alternatives --install /usr/bin/vi vi /usr/bin/nvim 60
" sudo update-alternatives --config vi
import React from 'react';
import ReactDOM from 'react-dom';
import _ from 'lodash';
import './index.css';
function Square(props) {
return (
<button className="square" onClick={props.onClick}>
# Don't delay after <esc>
set -g escape-time 10
# Handle 24-bit colours correctly, maybe
#set -g default-terminal "xterm"
set -g default-terminal "screen-256color"
set -ga terminal-overrides ",xterm:Tc"
## This is from: