Sign in to follow this  
Followers 0
autoitxp

Internet Lock

7 posts in this topic

#1 ·  Posted (edited)

Hi !

i wanted to know if there is any function in wininet.dll to lock internet . i really wanted to know how to lock internet. there is many other function to check internet connection state like InternetGetConnectedState or internetattemptconnect. there should be some lock function aswell ;d

DllCall('wininet.dll', 'int', 'InternetCloseHandle', 'long', $l_InternetSession)
Edited by autoitxp

Share this post


Link to post
Share on other sites



Hi !

i wanted to know is there any function in wininet.dll to lock internet . i really wanted to know how to lock internet. there is many other function to check internet connection state like InternetGetConnectedState or internetattemptconnect. there should be some lock function aswell ;d

DllCall('wininet.dll', 'int', 'InternetCloseHandle', 'long', $l_InternetSession)

To simply lock the internet? well, you could close port 80 and port 443. That would do most of it. However if they specify a differnt port in the URL string to get to a site that requires a different port number then they can get out to at least that site. Note: If they use a different browser or web access application, then this may not apply.

A second option is to run the PC through a router, and block it there with MAC filtering.

A third option is to put a proxy setting in the browser. Be warned they may use a different browser and get past this one.

You could change the HOST file. Not a good idea for it blocks whoever logs int the PC.

Also, look here:

http://windowsitpro.com/article/articleid/85079/jsi-tip-10092-how-can-i-block-internet-access-for-a-specific-user-account.html

Share this post


Link to post
Share on other sites

so there is no single decent way to lock internet/?

Share this post


Link to post
Share on other sites

If by lock you mean disconnect you can use this to disconnect an automatic dial-up connection as stated in this function description page. If you're using router connection you can use WinHttp.WinHttpRequest.5.1 object to send requests to the router page to request disconnection, described here.

Share this post


Link to post
Share on other sites

Cant you just find what ports are open and close them with a 'while'?

netstat -an |find /i "listening" > c:'openports.txt

From Cmd and FileRead and close the ports that are shown.


[Cheeky]Comment[/Cheeky]

Share this post


Link to post
Share on other sites

Maybe it would help when the OP is a little clearer in what it is that is exactly required.

There is a magnitude of solutions depending on the requirements from simply "removing the IP gateway and only make other ip addresses available in the pc's subnet" to installing some sort of proxy for filtering the outbound traffic.


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0