Just little something interesting. Basically, an easy way to drop utilities on teh webs. Write something in Python and this site will setup interface and host it, even give you version control and RESTful API.
utilitymill.com
utilitymill.com/utility/Tripcode_Generator
That websight is now my new tripper webservice.
use LWP::UserAgent;
$|= 1;
my @chrs = ('a'..'z', 'A'..'Z', 0..9);
my $filter = $ARGV[0] || q{.};
while (1) {
my $pass;
$pass .= $chrs[rand @chrs] for 1..5;
my $resp = LWP::UserAgent->new->post(
"http://utilitymill.com/utility/Tripcode_Generator", [ PASSWORD => $pass, revision => 2]);
my ($trip) = $resp->content =~ /off">(.*?)\s/;
print "$pass\t$trip\n"
if $trip =~ /$filter/;
}
>>1
produces incorrect output for "kami".
looks like you forgot to convert to shift jis.
it also produces incorrect output for passwords containing any of: &<>"',
you can compare the results with http://hotaru.thinkindifferent.net/trip.html, which gives the same results as wakaba and kareha.
>>3 here,
> it also produces incorrect output for passwords containing any of: &<>"',
i just fixed this, i don't know enough python to fix the problem with shift jis.
i assumed doing
pw = pw.encode('shift_jis','ignore')
at the beginning of mktripcode would work but that still gives the same error:
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)
>>4
Assuming your password input is utf-8 encoded text in a str
data type:
def mktripcode(pw):
pw = pw.decode('utf8', 'ignore') \
.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:]
should produce correct results.
Damn wakabamark.
>>2
wait, why on earth would you use a web service to run a tripcode? I really hope you're a troll.
Absolutely useless.