Hi Everyone,

It looks like your right about trying to brute force the dsl password. I managed to write a small script to generate 600 combinations. Testing the 620 combinations took 5 minutes and 20 seconds.

I found out that the Puerto Rico telecom company is using passwords of the following form: 30aLPOjbhy

Unfortunatly, I don't know if the positions are always the same. (i.e. the digits are always there and the upper/lowercase also.) I will probably need to find a super-password for a Zyxel Prestige 600.

So this is now, just a learning hack. The following code works for a small subset. But I can't think of how to reset the initial values and retry all the additional combinations. Any tips?

#!/usr/bin/perl -w #my @genString = ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9'); my @genString = ('a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a', 'a'); my @chars = ("a".."z", "A".."Z", "0".."9"); my $cnt=0; for(my $i; $i <= $#genString; $i++) { foreach my $newChar (@chars) { $genString[$i] = $newChar; print "", @genString, "\n"; # print "$cnt\t\t", @genString, "\n"; $cnt++; } }

In reply to Re: How do I generate a sequential string? by Anonymous Monk
in thread How do I generate a sequential string? by Anonymous Monk

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.