Utility Mill (8)

1 Name: #!/usr/bin/anonymous : 2008-01-04 12:54 ID:E79tsDJD

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

2 Name: #!/usr/bin/anonymous : 2008-01-04 17:47 ID:Heaven

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/;
}

3 Name: #!/usr/bin/anonymous : 2008-01-05 18:24 ID:Heaven

>>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.

4 Name: #!/usr/bin/anonymous : 2008-01-05 19:20 ID:Heaven

>>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)

5 Name: #!/usr/bin/anonymous : 2008-01-06 07:08 ID:yYnOtwjx

>>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('"', '&quot;') \
.replace("'", ''') \
.replace('<', '&lt;') \
.replace('>', '&gt;') \
.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.

6 Name: #!/usr/bin/anonymous : 2008-01-06 07:09 ID:Heaven

Damn wakabamark.

7 Name: #!/usr/bin/anonymous : 2008-01-06 07:12 ID:Heaven

>>2
wait, why on earth would you use a web service to run a tripcode? I really hope you're a troll.

8 Name: #!/usr/bin/anonymous : 2008-01-07 17:30 ID:Heaven

This thread has been closed. You cannot post in this thread any longer.