Skip to content

Instantly share code, notes, and snippets.

View johnnykv's full-sized avatar

Johnny Vestergaard johnnykv

View GitHub Profile
@johnnykv
johnnykv / Eratosthenes.asm
Created May 7, 2011 18:53
Finding primes with sieve of Eratosthenes using assembly.
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
include \masm32\include\masm32rt.inc
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
comment * -----------------------------------------------------
Johnny Vestergaard - 2011
finding primes with sieve
of Eratosthenes in assembler
----------------------------------------------------- *
@johnnykv
johnnykv / DiningPhil.cs
Created August 23, 2011 08:41
C# solution for dining philosophers.
//C# solution for dining philosophers.
//Johnny Vestergaard - 2011
//jkv@unixcluster.dk
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
@johnnykv
johnnykv / ThreadsAndGui.cs
Created August 24, 2011 11:38
Korrekt manipulering af UI elementer fra en separat tråd.
//Johnny Vestergaard - 2011
//Et eksempel på _korrekt_ manipulering af et UI element
//fra en separat tråd.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
@johnnykv
johnnykv / Heralding.log
Created August 26, 2011 19:23
Credentials from my Heralding honeypot
This file has been truncated, but you can view the full file.
2011-07-15 20:15:35,049;338b5dab-78d6-45c4-b7fc-669ce77a3fa3;SSH;202.91.241.245;45452;"root";"123456"
2011-07-15 20:15:37,283;10d57bd3-94ea-4446-80ba-542232c68c31;SSH;202.91.241.245;45551;"root";"123456789"
2011-07-15 20:15:39,486;dc0ebb5b-98fe-4fd1-be0d-d09dfae43870;SSH;202.91.241.245;45627;"root";"12345678"
2011-07-15 20:15:41,685;c389bd0e-4409-4033-a95a-d5e66251cffe;SSH;202.91.241.245;45716;"root";"654321"
2011-07-15 20:15:43,783;1c58b798-483d-411c-a0df-ee3e7af2602b;SSH;202.91.241.245;45804;"root";"1qaz2wsx"
2011-07-15 20:15:45,987;054138a5-8d4c-4012-890d-0e3e747f7ddc;SSH;202.91.241.245;45872;"root";"1qazxsw2"
2011-07-15 20:15:48,077;16128c21-dbd9-409a-9cf1-347c8805e4f6;SSH;202.91.241.245;45959;"root";"111111"
2011-07-15 20:15:50,341;7c4cb3a0-edbe-421b-b3d4-69561fcb1c4c;SSH;202.91.241.245;46034;"root";"000000"
2011-07-15 20:15:52,546;0bf5a8a7-a937-4462-987d-551cc3b03edf;SSH;202.91.241.245;46121;"root";"redhat"
2011-07-15 20:15:54,739;dc20f2a5-ed62-44e1-9fb5-92fde90d3728;SSH;202.91.241.245;46199;"root";"roo
@johnnykv
johnnykv / BigIntCSharp.cs
Created September 5, 2011 09:28
Simpel BigInt implementation i C#
//Johnny Vestergaard - 2011
// Simpel BigInt implementation i C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
namespace tmpOperatorOverload
@johnnykv
johnnykv / CSharpEvents.cs
Created September 6, 2011 13:03
C# events
//Johnny Vestergaard - 2011
//C# events
class Program
{
static void Main(string[] args)
{
//Opret ny instans af yawningcat
YawningCat yawningCat = new YawningCat();
@johnnykv
johnnykv / NetworkStreamHelper.cs
Created September 14, 2011 22:39
C#: Automates the process of prefixing a byte array with length before transmitting.
//Johnny Vestergaard - 2011
//jkv@unixcluster.dk
//Automates the process of prefixing a byte array with length before transmitting.
//The length is sent as a fixed sized integer.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
@johnnykv
johnnykv / maze.py
Created November 9, 2011 21:00
Implementation of the pathfinding algorithm to solve the 2011 Prosa CTF AMazeing Steganography challenge.
#Johnny Vestergaard - 2011
#jkv@unixcluster.dk
#Implementation of the pathfinding (http://en.wikipedia.org/wiki/Pathfinding) algorithm to solve
#the 2011 Prosa CTF AMazeing Steganography challenge.
from PIL import Image
import cProfile
import signal
import pdb
from numpy import zeros
@johnnykv
johnnykv / gist:1428761
Created December 4, 2011 01:27
GCHQ-help1.c
//Johnny Vestergaard - 2011
//jkv@unixcluster.dk
//A bit of help to the GCHQ challenge...
#include <stdio.h>
//Nedenstående er hex koderne fra http://canyoucrackit.co.uk - som viste sig primært(hint: og hvad ellers?!?!) at være assembler instruktioner.
char gchqFunc[] = "\xeb\x04\xaf\xc2\xbf\xa3\x81\xec\x00\x01\x00\x00\x31\xc9\x88\x0c\x0c\xfe\xc1\x75\xf9\x31\xc0\xba\xef\xbe\xad\xde\x02\x04\x0c\x00\xd0\xc1\xca\x08\x8a\x1c\x0c\x8a\x3c\x04\x88\x1c\x04\x88\x3c\x0c\xfe\xc1\x75\xe8\xe9\x5c\x00\x00\x00\x89\xe3\x81\xc3\x04\x00\x00\x00\x5c\x58\x3d\x41\x41\x41\x41\x75\x43\x58\x3d\x42\x42\x42\x42\x75\x3b\x5a\x89\xd1\x89\xe6\x89\xdf\x29\xcf\xf3\xa4\x89\xde\x89\xd1\x89\xdf\x29\xcf\x31\xc0\x31\xdb\x31\xd2\xfe\xc0\x02\x1c\x06\x8a\x14\x06\x8a\x34\x1e\x88\x34\x06\x88\x14\x1e\x00\xf2\x30\xf6\x8a\x1c\x16\x8a\x17\x30\xda\x88\x17\x47\x49\x75\xde\x31\xdb\x89\xd8\xfe\xc0\xcd\x80\x90\x90\xe8\x9d\xff\xff\xff\x41\x41\x41\x41";
//pssst: Der mangler vist noget i ovenstående... Tjek hvorfor ovenstående koden springer i int 0x80 med 0x0
@johnnykv
johnnykv / honeypot-stats.txt
Created December 21, 2011 23:15
pipal stats from credentials logging honeypot.
//Johnny Vestergaard - 2011
//jkv@unixcluster.dk
Pipal (http://www.digininja.org/projects/pipal.php) stats from my honeypot which has been collecting credentials on SSH, Imap, Pop3 and telnet attacks since August 2011.
---- START ----
Total entries = 232177
Total unique entries = 34455