[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [K12OSN] Ot: scripting help



Thanks so much!!!  Stupid 3com NBX ....it only accepted 10 of my 11
characters of password but didn't complain about it.  Entering all 11
made it fail authentication. and of course there's no mention of
required password length on the UI and for that matter in the manual.
how i'm pining for asterisk....

Peter

On 3/14/07, Peter Scheie <peter scheie homedns org> wrote:
Here's a quick & dirty perl script that will give you what you describe
below:

#!/usr/bin/perl -w
#
# Takes a string and changes one character at a time to upper case

$str = shift;
$length = length($str);
@array = split(//,$str);
for ($i=0;$i<$length;$i++) {
   if ($array[$i] =~ /\D/) {
     $array[$i] = uc($array[$i]);
     print @array;
     print "\n";
     $array[$i] = lc($array[$i]);
   }
}

### End of script

This should give you 123Password, 123pAssword, and so on; it only
changes one character each time, and then changes it back.  So, it won't
give you 123PAssword, nor 123PASsword, etc.  Put this in a file, make it
executable, and then pass string that you want to modify as a command
line parameter, like so:

script 123password

HTH

Petre

Peter Hartmann wrote:
> I must have mistyped a password for my appliance (pbx) that has a
> https login....becasuse I can't get in!  (slaps head) I'm trying to
> figure out how to automatacally generate a password list that like
> this:  display every permutation of upper and lower case of a word
> prepended by the same number.
>
> ie.
>
> 123Password
> 123pAssword
> 123paSsword
> 123pasSword
>
>
> THANK YOU,
> Peter
>
> _______________________________________________
> K12OSN mailing list
> K12OSN redhat com
> https://www.redhat.com/mailman/listinfo/k12osn
> For more info see <http://www.k12os.org>
>

_______________________________________________
K12OSN mailing list
K12OSN redhat com
https://www.redhat.com/mailman/listinfo/k12osn
For more info see <http://www.k12os.org>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]