class CrackPass2
Javascript
Advanced Javascript

Getting into Fravia's Javascript page
A short Java program

by Chris
11 February 1998

Thanks for a good puzzle. I'm afraid we didn't apply english rules
(except by hand) but you might find the code a little interesting... 
Its short, written in Java, and cut the problem
down to a 20 minute walk through a bunch of words ending in "er".

<---- JDK 1.1.5 Java Source ---->
class CrackPass2
{
 public static void main(String[] args)
  {
 /* long magicpass = 25834242042L; */
  long magicpass = 2870461784L;
  int trythis[]={0,0,0,0,0,0,0,0};
  recurse(trythis,8,magicpass);
  };  /* main */

 public static void recurse(int[] trylist, int level, long curmagic)
  {
  long tempcur;
  char password[]=new char[8];
  char base[]={ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9','A',
'B', 'C', 'D', 'E', 'F',
    'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
'T', 'U', 'V', 'W', 'X', 'Y',
    'Z','a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
'n', 'o', 'p', 'q', 'r', 's', 't', 'u',
    'v', 'w', 'x', 'y', 'z' };
  int f[] = { 23,535,1047,1559,2071,2583,3095,3607,4119,4631,

    12,21,26,38,53,72,101,139,294,375,584,841,1164,
    1678,2425,4989,6478,10076,14494,21785,30621,69677,
    87452,139356,201113,278810,
    80,83,93,99,113,131,
    159,194,346,416,619,861,1165,1649,2256,4766,6077,
    9554,13713,20576,28894,65661,82386,131248,164801,262524 };

  if (level>1)
  {
   for (int i=10;i<62;i++)
   {
    trylist[level-1]=i;
    tempcur=(curmagic/level)-f[i];
    if ((tempcur%(level-1))==0) recurse(trylist,level-1,tempcur);
   };
  } /* level > 1 */
  else
  {
   for (int i=10;i<62;i++)
    if ((curmagic-f[i])==0)
    {
     trylist[level-1]=i;
     for(int j=0;j<8;j++) password[j]=base[trylist[j]];
     System.out.println(String.valueOf(password)+"r");
    };
  }; /* level==1 */

 };
};

<--- END OF SOURCE --->

Yours Truly,

Chris

You are deep inside Fravia's page of reverse engineering, choose your way out:

Javascript
Advanced Javascript

redhomepage redlinks redanonymity red+ORC redstudents' essays redacademy database
redtools redcocktails redantismut CGI-scripts redsearch_forms redmail_Fravia
redIs reverse engineering legal?