Solved

bypass java prompts

Posted on 1997-03-22
5
1,159 Views
Last Modified: 2006-11-17
How do you bypass java prompts so that you don't have to enter a user name and password on a site, but still have FULL access of that site (like you would if you had entered the password and user name)

I guess...  Like hacking the page to get in!?
0
Comment
Question by:motor-man
5 Comments
 

Expert Comment

by:alanw
ID: 1219121
The usernames etc is not generated by Java, and therefore can not be hacked (!!)

They are HTML server generated.  And this is a much bigger subject, than can be answered here.
0
 

Author Comment

by:motor-man
ID: 1219122

0
 
LVL 2

Expert Comment

by:majkl
ID: 1219123
Tehre is no such thing possible. Probably you won't find here an answer.
Try on IRC #java #java_hack. There sometimes come such thing, but Java should be "secure" language, so chenches are low. It depends lot of programers how did they solve this. Try to check also some bugs, that you can work around ..
Here is WWW address, where bugs are up . Study them and success is guaranted.
http://www2.vo.lu/homepages/gmid/java.htm
Hope me brings some points :

0
 

Author Comment

by:motor-man
ID: 1219124
thanx...  but nope

sorry
0
 
LVL 1

Accepted Solution

by:
JWBito earned 200 total points
ID: 1219125
I assume you refer to access a site that is implementing http Basic Authentication when you refer to "java prompts" for user name and password.

I suppose I could tell you exactly what you need to put in, would have to shoot you afterwards.  I believe that you want to get a URLConnection:

URL u = new URL(mumble);
//Default in JDK 1.1 will return HttpURLConnection for http spec.
URLConnection c = u.openConnection();  

// Now you need to set some modes

c.setDoInput(true);
c.setAllowUserInteraction(false);

// Now you need to know the user id and password
// I don't know where to pick up a base64 encoding class
// I'm sure someone has built it...

String auth = com.imaginary.util.Encode64(userid + ":" + pass);
c.setRequestProperty("Authorization", "Basic " + auth);

DataInputStream dis = new DataInputStream(c.getInputStream());
// now read that "protected" page.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This video teaches viewers about errors in exception handling.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question