Results 1 to 3 of 3
Thread: Trying to bypass proxy
- 03-22-2010, 11:20 AM #1
Member
- Join Date
- Mar 2010
- Posts
- 1
- Rep Power
- 0
Trying to bypass proxy
hey I am a beginner and stuck on something....
My college has a proxy that I am trying to bypass...
Everytime I try to open a page it redirects to a page that asks for policy acknowledgement.. for which we have to click a link..
I want to bypass that clicking part.. for without clicking none of the internet applications work ...
For suppose I type Google in the browser I get this page (trimmed_) :
Notice the <a> tag there.. that's what I want to capture.. I know how to parse HTML as such... Here's the snippet I am doing to open connection :Java Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Notification: Policy Acknowledgement</title> </head> <body> ... <p> <a href="http://10.10.2.15/0:3600:86400:4ba74287/ad776dc33401e888760f72399c80c6ff/http://www.nitk.ac.in">Click here to accept this statement and access the Internet.</a> </p> <p> Time: Mon, 22 Mar 2010 15:42:23 IST<br>IP Address: 172.16.54.143<br> </p> </body> </html>
my problem is that this returns a 403 error..... while if I open the URL in a browser ... I get the page I mentioned above... How can I read 'THAT' page in java... maybe the server detects the page is not being opened in a browser.....Any Ideas...Java Code:System.getProperties().put("proxySet",true); System.getProperties().put("proxyHost","10.10.2.15"); System.getProperties().put("proxyPort",80); ucon = u.openConnection(); //ucon is URLConnection, u is URL Reader inp = new InputStreamReader((InputStream) u.getContent());
Additional Question... Suppose I get the link... What should I do to simulate a 'CLICK' on it??? Can I just connect to that URL and the server would think the user clicked on it???
- 03-23-2010, 05:27 PM #2
Your school's routers are blocking your requests and sending you that error page. Unlike the movies, I seriously doubt you will find a way past them.
To use the school's proxy, look at Proxy and URL.openConnection(Proxy proxy). That will allow you to follow the school's procedures without the annoying error pages.The Java Tutorial. Read it.
- 04-16-2010, 02:46 PM #3
Member
- Join Date
- Apr 2010
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
bypass unsigned app warning Leopard / Ubuntu
By gabrielcik in forum New To JavaReplies: 1Last Post: 03-04-2010, 02:18 PM -
how do you bypass the enter(/n) sign in a program?
By mtwisd in forum NetBeansReplies: 2Last Post: 07-13-2009, 04:45 AM -
how do you bypass the enter(/n) key in a program?
By mtwisd in forum New To JavaReplies: 1Last Post: 04-24-2009, 08:50 AM -
Http - proxy or non-proxy ?
By Shiv in forum NetworkingReplies: 0Last Post: 04-11-2009, 08:07 AM -
bypass NTLM login
By ruchsriv in forum Web FrameworksReplies: 0Last Post: 03-30-2009, 08:23 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks