Java script to encrypt login password

Glen Davies GLEN at rimu.cce.ac.nz
Thu Oct 16 16:59:15 EDT 1997


> <FORM name="form1" METHOD=POST 
> ACTION=http://www.goodstuff.com/cgi-bin/signon> 
> <INPUT NAME="input" TYPE=hidden value="agovx"><br>
> <INPUT TYPE="hidden" NAME=code value="daviesg" SIZE=15> 
> <INPUT TYPE="hidden" NAME=pw  SIZE=15>
> <INPUT TYPE=Submit VALUE="login to electronic journals" 
> onClick="encode(this.form.input.value)">

> So is this section that needs to be modified. Say for instance, I want
> to make it so that students can seamlessly connect to Proquest at:
> http://www.umi.com/pqdweb?ReqType=341t without having to plug in their
> password and id. What do I change about the values in the form.

Hi

I had the above question about my java script posting from yesterday. 
I thought the response might be of interest to others on the list. 

By taking the html form info from the page you get from  
http://www.umi.com/pqdweb?ReqType=341t I have modified the script as 
follows. As it is it will try and log in to proquest with a user id 
of daviesg and a password of henry. You need to replace the UserId 
value with your valid user id. To work out the encrypted password 
value to enter in the input named "input" (currently with a value of 
agovx) in the variable called ref at the top of the script find each 
letter of your password and take the letter immediately to the left.

I hope this makes sense. We don't use proquest so I couldn't test it 
properly. When I added the following to a local html page and hit the 
Login to Proquest button I got a message back form Proquest saying  
"invalid userid and password please try again"  so it seems to be 
doing the right thing, just needs a valid id - hopefully!



 <SCRIPT LANGUAGE="JavaScript">
 <!-- Beginning of JavaScript -
      
 function encode(text) { 
      
      
Ref="1923786540ckjmonpqstuvrxydahgeilbfwzCKJMONPQSTUVRXYDAHGEILBFWZ" 
       Result=""
      for (Count=0; Count<text.length; Count++) {
      
           Char=text.substring (Count, Count+1); 
           Num=Ref.indexOf (Char);
           EncodeChar=Ref.substring(Num+1, Num+2) 
           Result += EncodeChar
      
      }
      
 document.form1.Passwd.value=Result
 }
      
 // - End of JavaScript - -->
 </SCRIPT>
      
 </HEAD>
 <FORM name="form1" METHOD=POST 
     ACTION=http://www.umi.com/pqdweb> 
<input type="hidden" name="ReqType" value="301">  
<INPUT  NAME="input" TYPE=hidden value="agovx"><br>
<INPUT TYPE="hidden" NAME=UserId  value="daviesg" SIZE=15> 
<INPUT TYPE="hidden" NAME=Passwd  SIZE=15>
<INPUT TYPE=Submit VALUE="Login to Proquest" 
   onClick="encode(this.form.input.value)">
  </form>

 
 
***********************************************************
Glen Davies
Information Technology Librarian
Christchurch College of Education
Christchurch
New Zealand
glen at rimu.cce.ac.nz
64-3-343 7737
************************************************************
"I've been drunk for about a week now, and I thought it might
 sober me up to sit in a library" F.Scott Fitzgerald
                                  The Great Gatsby, ch3
************************************************************


More information about the Web4lib mailing list