|
-
Jan 9th, 2009, 11:43 AM
#1
Thread Starter
Lively Member
[Help]Get HTTP Links
Hi all i got one qetion how can example listen on port 80 using winsock and
example someone has internet explorer open and is visiting a page how can i now capture the link and add it to a textbox or listbox i hope you understand what i mean my english is pretty poor
-
Jan 9th, 2009, 12:25 PM
#2
Re: [Help]Get HTTP Links
If you are listening on port 80 then you are kind of doing like a web server. Someone would have to know your external IP and connect to your wanna-be web server. If that happens then you would know that persons IP by querrying your socket's remote IP.
As far as someone visting a page on some other site you can't capture the link as you will have no awareness of such an event.
I'm just speculating on what you want but I really don't know for sure what you are trying to get at.
-
Jan 9th, 2009, 01:18 PM
#3
Thread Starter
Lively Member
Re: [Help]Get HTTP Links
i explain what im wanna to to is a app with a winsock control and a listbox
the winsock control should listen on port 80 because http request use port 80 now for example someone open up the internet explorer or maybe firefox and enters a link and goes to the site the link that he send the http request too should appear in the listbox
-
Jan 9th, 2009, 02:10 PM
#4
Re: [Help]Get HTTP Links
OK, you are saying the same thing you said the first time so my reply is the same. Nothing is going to happen just because your Winsock is listening on port 80.
Exactly what do you mean by enters a link? What link is this? Is it a link to your site? A link to your app? How does someone get this link?
Exactly what do you mean by the site? Is this your own site and you have control over it or is it just any old site?
-
Jan 9th, 2009, 02:53 PM
#5
Re: [Help]Get HTTP Links
Let me see if I can explain it this way.
You have a application with a Winsock Control. The Winsock is listening on Port 80. Now this sounds like you are trying to make a Web Site server application.
OK, let's say you are. Now you need someone to connect to your site. So, someone has to know what your address is. Let's say that I know what it is. So I open my IE and type in http://nnn.nnn.nnn.nnn/index.html. Now nnn.nnn.nnn.nnn is the external address of your PC where your application is running. Now your application gets a connection from my browser. So, in your Winsock1_ConnectionRequest event you accept my request and then my browser get the OK from your application so it now will send your application the HTTP request headers which is a request to get your index.html page. So, in your Winsock1_DataArrival event your program will recieve the HTTP header my browser sent and from there you can display them in your textbox or your listbox.
Is this what you are wanting? If not then your program will do nothing at all.
-
Jan 9th, 2009, 05:50 PM
#6
Thread Starter
Lively Member
Re: [Help]Get HTTP Links
:H all i want is that my app gets every site that is visiting like a monitor every not like reading any bookmark files i want that it is working in the background and getting all web links typped in from anyuser and adds it to a listbox maybe you understand me more sorry for my bad english
-
Jan 9th, 2009, 08:54 PM
#7
Re: [Help]Get HTTP Links
Sorry, I cannot understand what you want exactly but I don't think you will be able to do it with your application. Your application is only good if other people connect to it. You cannot use it like a monitor.
-
Jan 9th, 2009, 08:57 PM
#8
Thread Starter
Lively Member
-
Jan 9th, 2009, 11:38 PM
#9
Lively Member
Re: [Help]Get HTTP Links
I think he wants every site he goes to, to go through his application, like a tunnel/proxy, whatever, so he can see all sites that are visited.
You could, make a proxy server, which would work. You would have to change the user's proxy settings for IE via registry or have them do it manually.
Another possibility is by modifying the Windows HOSTS file. I'm not sure if this would work for your situation, but you can read on it:
http://en.wikipedia.org/wiki/Hosts_file#Redirecting
If you decide to make it a proxy server, there are some examples here.
And if you want to change the proxy settings programatically, you can try this:
http://www.pscode.com/vb/scripts/Sho...58695&lngWId=1
Just set the user's proxy server to your computer's IP (127.0.0.1 would also work) and port 80, or whatever port your Winsock is using (the standard port for proxy servers seems to be 8080).
Then, on the Winsock_DataArrival() event, you can look at the "Host: " field in the HTTP header which will contain the domain name that they are going to.
To get the full URL they are visiting, you would combine that Host field with the GET /request_here.php part which is at the very beginning of the data.
-
Jan 9th, 2009, 11:46 PM
#10
Re: [Help]Get HTTP Links
Perhaps you are correct here but what gets me is his way of describing it. Like when he says getting all web links typped in from any user. Now it's that any user that gets me. Like it's someone else and also when he says someone open up the internet explorer or maybe firefox and enters a link and goes to the site. Here it's the someone meaning not him or the part ...goes to the site like it's someone else going to the site whatever that is.
Well if you can figure what he means then great but I sure can't make heads or tails of it.
-
Jan 10th, 2009, 01:04 AM
#11
Thread Starter
Lively Member
Re: [Help]Get HTTP Links
Daniel Elkins thats excualy what i want that all site goes to my app and jmsrickland sorry :H i know my english is horrible
-
Jan 10th, 2009, 01:21 AM
#12
Re: [Help]Get HTTP Links
Sorry hresha that I wasn't able to understand your request but at least Daniel did so I hope his post put you on the right path the resolve your issue.
-
Jan 10th, 2009, 01:28 AM
#13
Thread Starter
Lively Member
Re: [Help]Get HTTP Links
 Originally Posted by jmsrickland
Sorry hresha that I wasn't able to understand your request but at least Daniel did so I hope his post put you on the right path the resolve your issue.
Nth bro thx for trying to help me yeah i guess he putted me in the right direction hehe
-
Jan 10th, 2009, 01:29 AM
#14
Re: [Help]Get HTTP Links
Can't you just retrieve the History for the IE?
-
Jan 10th, 2009, 01:29 AM
#15
Lively Member
Re: [Help]Get HTTP Links
Try & see if you can get it to work...shouldn't be too hard. But if you need help, post here and attach your project.
-
Jan 10th, 2009, 11:04 AM
#16
Re: [Help]Get HTTP Links
Could this be a sort of a packet sniffer program you want to make?
-
Jan 11th, 2009, 02:01 AM
#17
Lively Member
Re: [Help]Get HTTP Links
 Originally Posted by dee-u
Can't you just retrieve the History for the IE?
That would work also but if it's disabled in IE then it won't.
-
Jan 11th, 2009, 03:00 PM
#18
Thread Starter
Lively Member
Re: [Help]Get HTTP Links
 Originally Posted by jmsrickland
Could this be a sort of a packet sniffer program you want to make?
No packet sniffing if i would want to build a packet sniffing software i had to program a raw socket
-
Jan 11th, 2009, 03:05 PM
#19
Re: [Help]Get HTTP Links
 Originally Posted by kresha7
No packet sniffing if i would want to build a packet sniffing software i had to program a raw socket
That's why is said "...sort of a packet sniffer...". I knew it wasn't a full blown sniffer but perhaps a sniffer-like program for HTTP conections only.
-
Jan 11th, 2009, 03:10 PM
#20
Thread Starter
Lively Member
Re: [Help]Get HTTP Links
you can call it like that it should listen for Outgoing HTTP Connection and List them in a listbox that is what im trying to do
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|