Created
September 2, 2014 17:34
-
-
Save coruus/b0656c281f34f42d3ae0 to your computer and use it in GitHub Desktop.
gpgwtf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const byte * | |
get_session_marker( size_t *rlen ) | |
{ | |
static byte marker[SIZEOF_UNSIGNED_LONG*2]; | |
static int initialized; | |
if ( !initialized ) { | |
volatile ulong aa, bb; | |
ulong a, b; | |
initialized = 1; | |
a = aa ^ (ulong)getpid(); | |
b = bb ^ (ulong)time(NULL); | |
memcpy( marker, &a, SIZEOF_UNSIGNED_LONG ); | |
memcpy( marker+SIZEOF_UNSIGNED_LONG, &b, SIZEOF_UNSIGNED_LONG ); | |
} | |
*rlen = sizeof(marker); | |
return marker; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment