Oscar18

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Dynamic Link to newest version #45985
    Oscar18
    Participant

    Thank you,

    It works!

    in reply to: Password scrambling for Proxy Sock #45961
    Oscar18
    Participant

    Thank you Britgirl.

    For anyone interested here’s the modified file:

    #!/usr/bin/env perl

    use strict;

    #
    # ./encode_password.pl password
    #
    my $password = $ARGV[0];

    if ($password) {
    my $encodedPassword = encodePassword($password);
    print “$encodedPassword\n”;
    } else {
    print “Please provide a password as an argument.\n”;
    }

    sub encodePassword {
    my $p = shift;
    my $sPass = “:”;
    my $sTmp = “”;

    if (!$p) {
    return “”;
    }

    for (my $i = 0; $i < length($p); $i++) {
    my $c = substr($p, $i, 1);
    my $a = ord($c);

    $sTmp = ($a + $i + 1) . “:”;
    $sPass .= $sTmp;
    $sTmp = “”;
    }

    return $sPass;
    }

Viewing 2 posts - 1 through 2 (of 2 total)