Name: Anonymous 2007-08-30 5:50 ID:SUIBJgzE
ITT I will perform some saged experiments with tripcodes.
<?php
function tripcode($plain)
{
$salt = substr($plain."H.",1,2);
$salt = ereg_replace("[^\.-z]",".",$salt);
$salt = strtr($salt,":;<=>?@[\\]^_`","ABCDEFGabcdef");
return substr(crypt($plain,$salt),-10);
}
echo tripcode("tripcode"); // Outputs 3GqYIJ3Obs
?>
void shiichan_salt(unsigned char* const in, unsigned char* const salt)
{
unsigned int i = 0;
const char saltchars[] = ":;<=>?@\\]^_`ABCDEFGabcdef";
for (i = 0; i < 8; ++i) {
switch (in[i]) {
case '&': strncpy((char*)in + i, "&", 5); break;
case '"': strncpy((char*)in + i, """, 6); break;
case '\'': strncpy((char*)in + i, "'", 6); break;
case '<': strncpy((char*)in + i, "<", 4); break;
case '>': strncpy((char*)in + i, ">", 4); break;
case '\x1': strncpy((char*)in + i, "<", 4); break;
case '\x2': strncpy((char*)in + i, ">", 4); break;
case '\x3': strncpy((char*)in + i, """, 6); break;
}
}
strncpy((char*)salt, (char*)in + 1, 2);
if (strlen((char*)in) == 2) salt[1] = 'H';
else if (strlen((char*)in) < 2){
salt[0] = strlen((char*)in) ? 'H' : '.';
salt[1] = '.';
}
for (i = 0; i < 13; ++i) {
if (salt[0] == saltchars[i]) salt[0] = saltchars[i + 13];
if (salt[1] == saltchars[i]) salt[1] = saltchars[i + 13];
}
if (salt[0] < '0' || salt[0] > 'z') salt[0] = '.';
if (salt[1] < '0' || salt[1] > 'z') salt[1] = '.';
}
void shiichan_salt(unsigned char* const in, unsigned char* const salt) case '&': strncpy((char*)in + i, "&", 5); break;void Foo( int * ptr,
int const * ptrToConst,
int * const constPtr,
int const * const constPtrToConst )
{
*ptr = 0; // OK: modifies the pointee
ptr = 0; // OK: modifies the pointer
*ptrToConst = 0; // Error! Cannot modify the pointee
ptrToConst = 0; // OK: modifies the pointer
*constPtr = 0; // OK: modifies the pointee
constPtr = 0; // Error! Cannot modify the pointer
*constPtrToConst = 0; // Error! Cannot modify the pointee
constPtrToConst = 0; // Error! Cannot modify the pointer
}
char * const ptr;const char * const ptr;
const -- it's pretty hard to write code when you are receiving a blowjob.