Skip to content

Instantly share code, notes, and snippets.

@preetesh33
Created November 1, 2016 10:56
Show Gist options
  • Save preetesh33/5bf060242cf54d051e9a135bc450cac0 to your computer and use it in GitHub Desktop.
Save preetesh33/5bf060242cf54d051e9a135bc450cac0 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
srand (time());
my $randletter = "(int (rand (26)) + (int (rand (1) + .5) % 2 ? 65 : 97))";
my $salt = sprintf ("%c%c", eval $randletter, eval $randletter);
my $plaintext = shift;
my $crypttext = crypt ($plaintext, $salt);
print "${crypttext}\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment