DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: IDEA: Netlocker  (Read 6,418 times)

Eye-R

  • Participant
  • Joined in 2007
  • *
  • Posts: 2
IDEA: Netlocker
« on: January 20, 2007, 05:03 AM »
    Eh-up

  Just wunderin, is there not a lil proggie none o y'all knows 'bout, that upon a 'three-key-sequence'(ie: [ctrl] + [shift] + [end]) that'll disconnect all netwurk adapters, and disable them?

  an if not, would one o u kind chaps mind makey me one?

  It'd b quite nice if the sequnce whuz usr programmable, and also covered user specified programs in its envolope. but not essential.

  I'm lurnin c++, badly. else i'd 'ave a crack @ doing it meself... but i'm nowhere near that level yut...


  Ty in advance.


It is better tu remain silent, and be thought a phewl, than it is tu open yur mouth, and remove all doubt.
« Last Edit: January 20, 2007, 10:19 AM by brotherS »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Netlocker
« Reply #1 on: January 20, 2007, 08:36 AM »
This exact request came up before and the suggestion was to install one of the firewalls with a quick BLOCKALL switch.
Zone Alarm has it, so does Outpost Agnitum.  Others too probably.  I think thats the easiest and best approach.

Maybe someone can find that old thread?

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
Re: IDEA: Netlocker
« Reply #2 on: January 20, 2007, 10:23 AM »
Hi Eye-R, welcome to the forum! We prefer regular English in here (hint: t3h d4rknezZ surR0unDz m3H ISN'T, neither "y", "r", "u", "ur", "wut", "wat", "ne1", "sum1" etc.), please no SMS-speak... for your other chats get:



And why are you using space at the beginning of your lines? :o
Thank you.

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • Participated in NANY Challenge Twice
    • Coding Snacks
Re: IDEA: Netlocker
« Reply #3 on: January 28, 2007, 03:35 AM »
:) Try ToggleNic!

It's just a quick hack, using Windows' own network folder, but it works! I'm testing Vista, and I couldn't get the menu selction to work properly, but in XP you could remove the ; before WinMenuSelectItem and add a ; before Send.

Remember to change the nic= and hotkey= lines to match your system!

Skrommel

Code
;ToggleNic.ahk
; Use a hotkey to toggle your network cards' enabled state.
; Change the line nic= below to match the names of your network connections, separated by comma.
; Change the hotkey= below using !=Alt ^=Ctrl +=Shift or #=Win followed by any other key.
; For more advanced hotkeys, check the AutoHotkey help file.
;Skrommel @2007


;Settings
nic=Lokal tilkobling          ;Names of the network connections, separated by comma
hotkey=^F12                   ;Ctrl-F12


;Program
#SingleInstance,Force
#NoEnv
DetectHiddenWindows,On
SetWinDelay,0
Hotkey,%hotkey%,START,On
TrayTip,ToggleNic,Hotkey: %hotkey%
Return

START:
TrayTip,ToggleNic,Toggling...
RunWait,::{7007ACC7-3202-11D1-AAD2-00805FC1270E},,Hide
Sleep,1000
WinSet,Transparent,0,ahk_class CabinetWClass,,Program Manager
WinMove,ahk_class CabinetWClass,,guix,guiy,,,Program Manager
WinShow,ahk_class CabinetWClass,,Program Manager
ControlGet,nics,List,Col1,SysListView321,ahk_class CabinetWClass,,Program Manager

Loop,Parse,nics,`n
{
  If A_LoopField In %nic%
  {
    row:=A_Index-1
    ControlFocus,SysListView321,ahk_class CabinetWClass,,Program Manager
    ControlSend,SysListView321,{Home}{Down %row%},ahk_class CabinetWClass,,Program Manager
    ;WinMenuSelectItem,ahk_class CabinetWClass,,1&,1&,,,,,,Program Manager   ;In XP, use this instead of the line below
    Send,{Alt Down}f{Alt Up}{Enter}
    Sleep,1000
  }
}
WinClose,ahk_class CabinetWClass,,Program Manager
Return
« Last Edit: January 28, 2007, 03:37 AM by skrommel »

Original address: https://www.donationcoder.com/forum/index.php?topic=7084.0