[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

How are tripcodes created?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 8
Thread images: 1

I thought it would be a fun little project to create a tripcode finder in C, but I realized I don't know how a tripcode is generated from the given input text. I know secure tripcodes use an unknown salt, but non-secure tripcodes don't, so i was hoping someone here could explain how tripcodes on 4chan get generated.
>>
Basically it gets generated by a fucking faggot.
>>
>>60184152
Read wakaba manuals.
>>
Here's a simple implementation I wrote for my chan clone.
char *tripcode_hash(const char *pass)
{
/* returns pointer to static data -- NOT THREAD SAFE */
if (!pass) return NULL;
static const char *secret = "H.";
const char *p = (strlen(pass) < 3) ? NULL : pass; /* too short? */
char salt[5]; /* create salt */
sprintf(salt, "%c%c%s", (!p) ? ' ' : p[1], (!p) ? ' ' : p[2], secret);
char *s = salt;
do /* sanitize salt */
{
if (*s < '.' || *s > 'z') /* clamp to './0-9A-Za-z' */
*s = '.';
else if (*s >= ':' && *s <= '@') /* if ':;<=>?@' */
*s += 6; /* shift to 'ABCDEF' */
else if (*s >= '[' && *s <= '`') /* if '[\]^_`' */
*s += 6; /* shift to 'abcdef' */
} while (*++s);
char *trip = crypt(pass, salt);
memmove(&trip[1], &trip[3], strlen(&trip[3]) + 1);
trip[0] = '!';
return trip;
}
>>
>>60184182
Where can i find these? Google just turns up a bunch of unintelligible asian scribbles.
>>
>>60184226
Yep, guess where *chans originated
>>
https://github.com/ctrlcctrlv/infinity/blob/f89ac3f3090ca2025190a006abdfaf448e6110db/inc/functions.php

See the function generate_tripcode

It's a combination of Shift JIS encoding and the crypt function.
>>
>>60184240
Yeah, but I was hoping for english language support. Up until recently m00t was an american, so i was hoping for english.

>>60184215
This is really useful! Thanks!
Thread posts: 8
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.