I've been tinkering with Python all day today... it's pretty slick. Just for practice, I tried to cobble together a tripcode decoder that would let you have "real" words in your tripcode as !WAHa and Sling and others do, and it actually came out better than I thought it would be. I'm aware there's already a program that does this, but if memory serves me, it's Windows-only and in Japanese besides. My script is kind of dumb in the way it goes about things -- it basically just tears through random strings until it finds one that fits -- but I've tested it repeatedly and it seems to work. If you'd like to check it out, nab it here:
http://www.anre.org/crap/detripper.bz2
Of course, you may need to modify the hashbang line depending on where Python is on your machine, and don't forget those execute bits, people... Use "-h" for help.
First person to ask how to get this to run on Windows gets pointed and laughed at.
ok, apparently such tripcodes can be made to work on 4chan.
you just have to set the character encoding to shift-jis before you post.
> futallaby and shiichan (at least the versions used on 4chan) are apparently horribly broken wrt tripcodes.
they're interpreted as utf-8, except on /sjis/ where they aren't. official policy is to not fix this because we hate people who use tripcodes.
sage lol
Trip works alright, but do any other generators that run under Windows do strings that aren't 8 characters long? Seems like it's pretty limited by that, and it repeats them pretty often.
well, this one has no html entities...
LOL FAIL
seeking 4brute-johnbs.... or some better glue for x86-sse.S (etc)
I've had some luck using OpenSSL's crypt, but I'm struggling to get the right bits in and out of john's bitslicing DES code.
Have a look at vectripper. It's written for OS X but it uses john.
> seeking 4brute-johnbs
you won't get it on this board.
... indeed. After reading through the entire thread, and seeing this place's visibility on google, I can understand why nobody is just going to hand over the code to me...oh well. I'm making progress hacking something together. VecTripper's source hurts my eyes so I'm just sticking to peekin' through John. Reinventing the wheel sucks by the way...
I noticed an odd property of tripcodes (well, crypt actually): the last character will always be one of [.26AEIMQUYcgkosw] -- one of every fourth character in the overall character set.
DES output is 64 bits. It is encoded into a string consisting of characters from a set of 64, meaning each character encodes 6 bits. The output is 11 characters long, which adds up to 66 bits, the two last of which thus go unused. A loss of two bits means every fourth character is used.
Hmm. Maybe it'd've been better to substr($crypted, 2, 10)
to get more useful bits? Oh well, too late now.
Anybody have a link to hotaru's tripcode program? I've tried tripper+, but it can't find the same ones his did.
>>293
source:
without regex
with regex
windows binaries:
without regex
with regex
>>265
So I've found one I liked, but it uses a "ÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂ�ÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂ�". However I'm too dumb to actually understand how to find it in that list. /r/ help
>>300
That's already a Shift-JIS character. Since only the lower seven bits matter, you can usually find the ASCII character it matches with the high bit removed, but unfortunately for you ÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂ�ÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂ� corresponds to " (a quotation mark) -- and quotes get mangled in tripcodes.
At least for Wakaba/Kareha based boards, you can just switch the page's charset to Shift-JIS before posting and it'll work.
No, Wakaba and Kareha both automatically convert tripcodes to Shift-JIS no matter what the charset. If you start changing it manually, you're more likely to break it than anything else.
>>302
http://4-ch.net/code/kareha.pl/1187656971/7,11
http://kei.iichan.net/sand/res/849.html [first three messages]
In both of those I left the encoding alone on the first post, and switched to SJIS afterward.
I also have three test installations of both Wakaba and Kareha on three separate systems, and none of them convert the character sets correctly.
http://kei.iichan.net/sand/res/976.html
So what am I doing wrong here? It's not matching with what it said it should change to. D:
I'm not sure what you're trying to do, but the test case works exactly as it should - #ÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂ�ÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂÃÂ� becomes !yGAhoNiShI.
Do not test tripcodes in here. If you really have to, use the test thread.
Python-fag here, this seems to work fairly decently for ASCII tripcodes, seeing as Albright's original Python version is nowhere to be found, so it's based on the Thorn PHP version he posted earlier.
This code probably sucks and is slow.
def tripcode(trip):
if len(trip) > 0:
salt = trip[1:3] + "H.."
kill_non_ascii = re.compile("[^\.-z]")
salt = kill_non_ascii.sub('.', salt)
replace_dict = {
":" : "A",
";" : "B",
"<" : "C",
"=" : "D",
">" : "E",
"?" : "F",
"@" : "G",
"[" : "a",
"\\" : "b",
"]" : "c",
"^" : "d",
"_" : "e",
"`" : "f",
}
for line in replace_dict:
salt = salt.replace(line, replace_dict[line])
trip = trip.encode('shift_jis', 'replace')
salt = salt.encode('shift_jis', 'replace')
result = crypt(trip, salt)[3:]
else:
result = ""
return result
>>311
Ugh!
def get_tripcode(pw):
pw = pw.encode('sjis', 'ignore') \
.replace('"', '"') \
.replace("'", ''') \
.replace('<', '<') \
.replace('>', '>') \
.replace(',', ',')
salt = re.sub(r'[^\.-z]', '.', (pw + 'H..')[1:3])
salt = salt.translate(string.maketrans(r':;=?@[\]^_`', 'ABDFGabcdef'))
return crypt.crypt(pw, salt)[-10:]
import re,string,crypt
def get_tripcode(pw):
pw = pw.encode('sjis', 'ignore') \
.replace('"', '"') \
.replace("'", '\'') \
.replace('<', '<') \
.replace('>', '>') \
.replace(',', ',')
salt = re.sub(r'[^\.-z]', '.', (pw + 'H..')[1:3])
salt = salt.translate(string.maketrans(r':;=?@[\]^_`', 'ABDFGabcdef'))
return crypt.crypt(pw, salt)[-10:]
print(get_tripcode("faggot"))
Horribly in-efficient and shitty code for seeing how many tripcodes per second your machine can push. Needs the shit optimizing out of it.
import re,string,crypt,time,math
def get_tripcode(pw):
pw = pw.encode('sjis', 'ignore') \
.replace('"', '"') \
.replace("'", '\'') \
.replace('<', '<') \
.replace('>', '>') \
.replace(',', ',')
salt = re.sub(r'[^\.-z]', '.', (pw + 'H..')[1:3])
salt = salt.translate(string.maketrans(r':;=?@[\]^_`', 'ABDFGabcdef'))
return crypt.crypt(pw, salt)[-10:]
def ts(): return int(time.time())
end = ts() + 60
i = p = 0
while ts() < end:
p = 0
end2 = ts()+1
while ts() < end2:
p=p+1
i=i+1
get_tripcode("string")
lol = "%d tc/s" % (p)
print(lol)
#print("\b") * len(lol)
print "%d tripcodes generated in 60 seconds\nAverage rate: %d tripcodes per second\n" % (i,int(math.ceil(i/60)))
My comp is 0.9GhZ (lolol), and with this script I get around 1500 tc/s
With this script however, I get over 9000 tripcodes a second
<?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);
}
$end = time()+60;
$i=$p=0;
while(time()<$end)
{
$p=0;$end2 = time()+1;
while(time()<$end2)
{
$p++;$i++;
tripcode(time());
}
echo $p." tc/s";
echo str_repeat("\x08",strlen($p)+5);
}
echo "$i tripcodes generated in 60 seconds\nAverage rate: ".round($i/60)." tripcodes per second\n";
?>
>>314
An interpreted python script that wasn't intended to crack tripcodes is slow at cracking a tripcode? Holy shit, Batman.
That's why all the decent tripcode searchers are written in C.
>>316
You could possibly use Psyco or similar JIT compiler to boost your speed by a significant margin. It's pretty surprising how much faster PHP is, after all it's not a real programming language ;-)
>>319
You're still comparing that PHP code to a function in Python that's designed to produce correct tripcodes, and isn't intended for speed in the first place. If you're going to start benchmarking languages, at least do so competently.
forgive my lack of understanding on this topic, but is it possible to have any tripcode you want, given enough time/resources/whatever?
>>321 here
Sorry, retarded question
What I meant was: I've seen a few trips containing whole 8 letter words, uncanny matches to the poster's name, other things like that. I've used trip.exe and found that the list of trips output for a certain criteria is finite, so my more appropriate question is: is it possible to get EXACTLY the trip you want? if so how?
>>322
It's very unlikely that you could just find an 8 character tripcode that's exactly the one you want it to be, it would possibly take years and years of processing time to find an exact match.
However it might be possible to randomly generate tripcodes and match them against a list of dictionary of 8 letter words, hence you could find full words and then change your name to match the new tripcode. Still wouldn't be very fast though.
>>322
different runs of trip.exe will produce different repeating lists of tripcodes because windows doesn't have random() and it's rand() sucks.
>different runs of trip.exe will produce different repeating lists of tripcode
Interesting, I am running two instances of trip.exe right now, searching for matches to the same string and I'm getting the exact same output from them both.
>>325
If you started them at the same time, that will be the case since the random number generator is seeded by the time in seconds.
Lol, you guys are smart. (Seriously. Not trolling. Some people's knowledge here really impresses me.)
C:\>trip.exe | grep -P \d{10}
`Eqppj9l = 1354773682
eyd!{P0V = 0841327956
I560v;3t = 8550610352
`Eqppj9l = 1354773682
eyd!{P0V = 0841327956
I560v;3t = 8550610352
This took ~4hrs to generate. (lol intel celeron)
>>329
What I'm trying to say is that trip.exe PRNG is terribly cyclic: The more complex the search string, the more likely the PRNG will run around in circles.
Instead of using rand(), which does suck horribly, just use this:
s1=((s1&4294967294)<<12)^(((s1<<13)^s1)>>19);
s2=((s2&4294967288)<<4)^(((s2<<2)^s2)>>25);
s3=((s3&4294967280)<<17)^(((s3<<3)^s3)>>11);
return s1^s2^s3;
Tausworthe random number generator, generates quality 32-bit random integers with a cycle of something like 2^88, extremely fast and simple. Seeding is left as an excercise to the reader, I just set s1, s2 and s3 to the seed times various large integers.
>>333
Nice. Never could get my head 'round bitwise operators, though...
>>333
Cycle of 2^88? So that is not a linear shift feedback whatchamacallit then?
Oh, of course. There are three variables, so the longest possible cycle isn't 2^32, it's 2^96...
I know it's faster, and the state is much, much smaller, but I'm not sure how it stacks up quality-wise. It's supposed to be a viable competitior, though, and it's certainly good enough for pretty much all casual uses.
>>331,333
here's a better one:
z1=((z1&4294967294)<<18)^(((z1<<6)^z1)>>13);
z2=((z2&4294967288)<<2)^(((z2<<2)^z2)>>27);
z3=((z3&4294967280)<<7)^(((z3<<13)^z3)>>21);
z4=((z4&4294967168)<<13)^(((z4<<3)^z4)>>12);
return z1^z2^z3^z4;
Just out of curiosity (I'd like to compare it to the work I'm doing now). How many kilo-crypts per second (kcps) are people getting right now with faster processors out such as a 2.6 ghz core 2 conroe?
>>339
897 mhz/7.15945 kcps
___ ___
/\_ \ /\_ \
\//\ \ ___\//\ \
\ \ \ / __`\\ \ \
\_\ \_/\ \L\ \\_\ \_
/\____\ \____//\____\
\/____/\/___/ \/____/
>>340
Killed non-essential process, 'optimised' my code, now I can get 8.9kcps. VICTOLY.
I hate to rain on your parade there, but I used to get ~100 on similar hardware.
>>342
I'M USING WINDOWS XP HOME EDITION ON AN EMACHINE 130. CONSIDER MY SHITTY PARADE DRY.
339 here.
I'm managing 520kcps with what I wrote in a couple hours, but that doesn't really say much.
I've been running 3 simultaneous instances of trip.exe for ~40 mins now, and got 31 trips matching a case sensitive 5 character string. Quad core's aiiiite.
More notably though, Vista (which I'm using) gives me completely unique results which is nice.
> More notably though, Vista (which I'm using) gives me completely unique results which is nice.
what
> Where's a link to an internet-based tripcode whatever thing?
http://hotaru.thinkindifferent.net/tripper.html
if you have a fast processor and run it in a decently fast browser like opera or safari it might actually be fast enough to be useful.
on my computers here it's horribly slow in firefox (freebsd and windows xp), slightly better in konqueror (freebsd) and IE 7 (windows xp), and almost fast enough to be useful in opera (freebsd and windows xp) and safari (windows xp). and these machines are all more than 2 years old.
>>356
0.4cps on my phone!
And 0.7cps on my DS ite with the DS browser!
To tie this thing into a current conspiracy theory of mine, since you're all talking about tripcode searchers...
Densha Otoko's trip code was nm4g8qV1Cg.
How long would it have taken, realistically, for someone to crack it in 2004? I'm interested in learning at what point it would no longer be plausible for someone to step forward and claim to be him, citing the tripcode as evidence.
(reposted without sage)
To tie this thing into a current conspiracy theory of mine, since you're all talking about tripcode searchers...
Densha Otoko's trip code was nm4g8qV1Cg.
How long would it have taken, realistically, for someone to crack it in 2004? I'm interested in learning at what point it would no longer be plausible for someone to step forward and claim to be him, citing the tripcode as evidence.
use mty or Tripcode Explorer instead. ;)
mty
http://naniya.sourceforge.jp/
Tripcode Explorer
http://tripper.kousaku.in/20050618.html
anyone know of an english translation of Tripcode Explorer?
>>360 A week? a few days? Not long, even back in 2004.
ITT: Idiots who can't even find stable hosting pretending to offer links to their shitty software.