substring ()

adz_619

Member
I am posting this here because there is no other section on the forum to post this sort of thing.

I am trying to crack a javascript challenge which has a password. The password is found through substring.

<script type="text/javascript">
var numletter="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";

function submitentry(){
verification = document.getElementById("passwd").value;

alert("Searching.");
alert("Searching..");
alert("Searching...");

password = numletter.substring(11,12);
password = password + numletter.substring(18,19);
password = password + numletter.substring(23,24);
password = password + numletter.substring(16,17);
password = password + numletter.substring(24,25);
password = password + numletter.substring(1,4);

if(verification == password){
alert("Well done, you've got it!");
} else {
alert("Nahh, thats wrong!");
}
}
</script>


The script is above, can someone help me find the password!

Thanks
adam
 
I think this would fall in the against the rules catagory. No discussion of cracking software. Sorry.
 
He isn't wanting to crack software, he's trying to 'crack' a problem. I don't know how to do it though, sorry.
 
I am posting this here because there is no other section on the forum to post this sort of thing.

I am trying to crack a javascript challenge which has a password. The password is found through substring.

<script type="text/javascript">
var numletter="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";

function submitentry(){
verification = document.getElementById("passwd").value;

alert("Searching.");
alert("Searching..");
alert("Searching...");

password = numletter.substring(11,12);
password = password + numletter.substring(18,19);
password = password + numletter.substring(23,24);
password = password + numletter.substring(16,17);
password = password + numletter.substring(24,25);
password = password + numletter.substring(1,4);

if(verification == password){
alert("Well done, you've got it!");
} else {
alert("Nahh, thats wrong!");
}
}
</script>


The script is above, can someone help me find the password!

Thanks
adam
I dont know that muhc javascript, but from hat i can gather "numletter.substring" then sets pointers in the array (numletter) defined at the top. The numbers that ireferences correspond to the number or letter that is X number of places along... for example, 3 would be the number "2" from the array as it is the 3rd character in the array...

Taking that logic, you can work out what they all are and (hopefully) get the password

dragon

*EDIT* - and no, this isnt against the rules
 
var numletter="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
password = numletter.substring(11,12);
password = password + numletter.substring(18,19);
password = password + numletter.substring(23,24);
password = password + numletter.substring(16,17);
password = password + numletter.substring(24,25);
password = password + numletter.substring(1,4);

These correspond to "bingo123", given
b
i
n
g
o
123

I think this would fall in the against the rules catagory. No discussion of cracking software. Sorry.
It's frickin JAVASCRIPT! Gawd!
 
Last edited:
Thanks for helping out guys. I used Stryak's answer and then used dragon 2309 description to see what it meant.

Cheers
 
Back
Top