Skip to content

Instantly share code, notes, and snippets.

@OrigamiTech
OrigamiTech / GLB.cs
Created August 24, 2011 22:07
Unpacker for the GLB files found in DemonStar
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
namespace LibDemonstar
{
public static class GLB
{
@OrigamiTech
OrigamiTech / AcidTrip.cs
Created June 23, 2011 20:57
Make a winforms program go trippy.
/*
* AcidTrip.cs (c) 2010 Will Kirkby.
* But frankly, I don't care if you share this around.
* It's a fun script.
*/
using System;
using System.Drawing;
using System.Windows.Forms;
namespace WK
@OrigamiTech
OrigamiTech / ReadPassword
Created May 2, 2011 14:33
Read a password via command-line without showing the password
public static string ReadPassword()
{ return ReadPassword('*'); }
public static string ReadPassword(char passwordchar)
{
string pass = "";
char c = Console.ReadKey(true).KeyChar;
while(c != (char)0x0D)
{
if(c == 0x08)
{
@OrigamiTech
OrigamiTech / Command-Line Guitar Hero
Created April 3, 2011 13:06
ported from a friend's friend's pascal source.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace guitar_hero
{
class Program
{
/*green,red,yellow,blue,cyan: left to right*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
using System.Drawing.Imaging;
using System.IO;
namespace Screenie
@OrigamiTech
OrigamiTech / XOR
Created March 8, 2011 19:11
XOR a file with a given key.
using System;
using System.Text;
using System.IO;
namespace XOR
{
class Program
{
static void Main(string[] args)
{
@OrigamiTech
OrigamiTech / MeinBandCamp
Created February 19, 2011 16:52
Bandcamp Scraper.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Net;
using System.IO;
using HundredMilesSoftware.UltraID3Lib;
namespace MeinBandCamp
using System;
using System.IO;
namespace EveryIPv6
{
class Program
{
static void Main(string[] args)
{
using (StreamWriter sw = new StreamWriter("dump.txt"))
for (ulong u1 = ulong.MinValue; u1 <= ulong.MaxValue; u1++)
@OrigamiTech
OrigamiTech / EveryIPv4
Created February 4, 2011 18:14
Dumps every IPv4 IP address to a text file.
using System;
using System.IO;
namespace EveryIPv4{
class Program{
static void Main(string[] args){
using(StreamWriter sw=new StreamWriter("dump.txt"))
for(uint u=uint.MinValue;u<=uint.MaxValue;u++)
for (byte b=0;b<4;b++)
sw.Write(((u>>((3-b)*8))&0xFF).ToString()+(b==3?'\n':'.'));
}
@OrigamiTech
OrigamiTech / NotFile
Created January 26, 2011 18:49
Not every byte of a file, and reverse the filename.
using System;
using System.IO;
namespace NotFile
{
class Program
{
static void Main(string[] args)
{
foreach (string path in args)