Skip to content
Browse files

use openssl for tripcode hashing

  • Loading branch information...
1 parent b0bf3c0 commit ab1dc57e0c7fcd3fa87033efbe1e81fab1e77e66 @savetheinternet committed Dec 7, 2011
Showing with 1 addition and 3 deletions.
  1. +0 −1 README
  2. +1 −2 strings.sh
View
1 README
@@ -3,4 +3,3 @@ h
Requirements:
- Bash >= 3.0
- OpenSSL
- - Perl
View
3 strings.sh
@@ -31,8 +31,7 @@ make_name_tripcode() {
salt=$(echo $salt | sed 's/[^\.-z]/./g')
salt=$(echo -n $salt | tr ':;<=>?@[\\]^_`' 'ABCDEFGabcdef')
- # TODO: Add mcrypt support
- tripcode=$(perl -e 'print crypt($ARGV[0], $ARGV[1])' $tripcode $salt)
+ tripcode=$(openssl passwd -crypt -salt "$salt" "$tripcode")
tripcode=$(echo -n $tripcode | tail -c 10)
echo -n "!$tripcode"

0 comments on commit ab1dc57

Please sign in to comment.
Something went wrong with that request. Please try again.