Jump to content

Cut Internet Connection


Skrip
 Share

Recommended Posts

That depends... Version of windows, network connection, etc.

Run("ipconfig.exe /release") ;might work on Windows 2000 and XP....

Ideally, you would want to disable the network adatper; or if you are on dialup, there are other posts that talk about disconnecting.

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

sorry if this has been asked before i did a search and nothing came up, by the way its IE (Internet Explorer)

Edited by Firestorm

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

HttpSetProxy(2, "111.11.111.11:1111")

ok i think that line will disable internet explorer use....basically wat that line does is set a "proxy" for internet explorer...u can do that manually if u open up IE, click "tools", click "internet options", go to "connections" tab, clcik "LAN Settings"....this basically sets a new proxy. the reason y this qill disable IE use is that the proxy i provided there is PROBABLY a "dead" proxy...u may set another set of random numbers instead of all the "111"s i put...if u want to know more bout proxies and wat they r, then just ask me.....im not 100% sure but i think that WILL disable internet use with IE....

[font="Fixedsys"][size="3"][u][font="Franklin Gothic Medium"] [/font][/u][/size][/font]

Link to comment
Share on other sites

hey Valuater, wat do u mean by "unplug"?? do u mean to say unplug the cord or is that a reference to sumthing u can do using the computer?? and i also request that sumone tell me how to do that "quote" thing wen other ppl's messages r in that one "box"...

thank you

[font="Fixedsys"][size="3"][u][font="Franklin Gothic Medium"] [/font][/u][/size][/font]

Link to comment
Share on other sites

hey Valuater, wat do u mean by "unplug"?? do u mean to say unplug the cord or is that a reference to sumthing u can do using the computer?? and i also request that sumone tell me how to do that "quote" thing wen other ppl's messages r in that one "box"...

thank you

I actually noticed some interesting WMI stuff relating to changing the power state of devices, so I'm putting together an example to turn off a NIC for you.

On the "quote" thing, you can just click the "Reply" button at the bottom-right of any individual post. That always seems to quote for me, so I'm not sure what difference the "Quote" button makes.

*EDIT* LOL I just remembered what the Quote button is for. You can click the Quote button on multiple posts, then click Reply and all the posts you chose to quote will be quoted in the reply.

Edited by c0deWorm

My UDFs: ExitCodes

Link to comment
Share on other sites

The following sets all network cards to a static address (which should in turn cut the internet connection):

$oPc = "."
$oWmi = ObjGet("winmgmts:\\" & $oPc & "\root\cimv2")
$oCol = $oWmi.ExecQuery("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")

Dim $oIp[1] = ["1.1.1.1"]
Dim $oSub[1] = ["255.255.255.0"]
Dim $oGate[1] = ["1.1.1.1"]
Dim $oMetric[1] = [1]

For $objNet in $oCol
    $objNet.EnableStatic($oIp, $oSub)
    $objNet.Setgateways($oGate, $oMetric)
Next

The next resets all network cards back to DHCP Enabled:

$oPc = "."
$oWmi = ObjGet("winmgmts:\\" & $oPc & "\root\cimv2")
$oCol = $oWmi.ExecQuery("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")

For $objNet in $oCol
    $objNet.EnableDHCP()
Next

I haven't tested the two above snippets of code thoroughly but they do work.

Both of these examples were translated from vb scripts found on msdn.microsoft.com under the WMI reference area. You will need the latest beta to use these.

We have enough youth. How about a fountain of SMART?

Link to comment
Share on other sites

If you're only concerned about Windows XP, you could use the command line device manager utility DEVCON.EXE to disable ALL Network Adapters. Use:

DEVCON DISABLE =NET

to disable all network adapters, and

DEVCON ENABLE =NET

to enable them. Use Devcon /? to get a list of it's basic commands, and Devcon help command to get detailed help on each command.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...