First heres my first problem. I did program a simple NUMERIC BRUTE TOOL,

use warnings; use strict; print "Tell me your Password (numbers only, max 5 chars) \n"; my $lf = <stdin>; my $nummer = 0; print "$nummer \n"; until ($nummer == $lf) { $nummer = $nummer + 1; print "$nummer \n"; chomp($nummer) } print "GOTCHA $lf !!! \n";


Ok and now i want to do the same with ALPHABET. I really dont have an idea ho to make somethin like "A + 1 = B" ...

So i made it another way. Translated Alpabet to numbers from 0-24. And i got this source :

use warnings; use strict; my @alphabet = ("a", "b", "c" , "d", "e", "f", "g" , "h" , "i" , "j" , + "k" , "l" , "m" , "n" , "o" , "p" , "q" , "r" , "s" , "t" , "u" , "v +" , "x" , "y" , "z"); my $nummer = 0; my $slovo; print "Tell me your pass (only small alphabet only ONE a-z)"; my $hladane = <stdin>; print "$alphabet[$nummer] \n"; $alphabet[$nummer] = $slovo; while ($slovo ne $hladane) { $nummer = $nummer + 1; print "$alphabet[$nummer]\n"; $alphabet[$nummer] = $slovo; chomp($hladane); } print "GOTCHA $hladane !!! \n";



It says all time only ERROR uninitialized value .. What the hell? Just want that if i give F to search it goes like A B C D E F - F STOP ! GOTCHA ...

And it does not stop, it does not find the letter ... only error and error :)

And the second problem is not big deal ... Have a look on the first program, test it and have a look on the END, AFTER GOTCHA > Number, it jumps to a new LINE and so the "!!!" stand alone one Line benath the others, what the hell? There is no "\n"

This two problems are destroying me today please if you have time help me .) - yea and my brute Alphabetical Tool searches only if there is one Letter .. i have no idea how to make it if there should be more ...

TY

Edit: g0n - replaced pre tags with code tags


In reply to BRUTEFORCE problem and a ?bug? by xoddam

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.