as of now, please refer to http://blog.remes-it.be aka 'The Security Kitchen'.
This blog is officially closed.
Tuesday, February 10, 2009
Monday, January 26, 2009
because not everybody will use transparent proxies.
As I travel around and attach my laptop to different networks, I'm left to disable/enable the proxy server settings ever so often. I grew tired of it and that's why I messed around with a small vbscript that :
a) detects whether the proxy settings are enabled or disabled
b) asks you to reverse that state
you may want to add additional code to enable disable different proxies.
Here's the code :
const HKEY_CURRENT_USER = &H80000001
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"&_
strComputer &"\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings"
strValueName = "ProxYEnable"
oReg.GetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
If dwValue = 1 Then
answer=Msgbox("Proxy is currently enabled. Disable it?",36)
ProxyOn = True
Elseif dwValue = 0 Then
answer=Msgbox("Proxy is currently disabled, Enable it?",36)
ProxyOn = False
End if
If ProxyOn=False Then
If answer = 6 Then
dwValue = 1
oReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
Elseif answer = 7 Then
dwValue = 0
oReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
End if
Elseif ProxyOn=True Then
If answer = 6 Then
dwValue = 0
oReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
Elseif answer = 7 Then
dwValue = 1
oReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
End if
End If
Have fun!
Stay Secure!
a) detects whether the proxy settings are enabled or disabled
b) asks you to reverse that state
you may want to add additional code to enable disable different proxies.
Here's the code :
const HKEY_CURRENT_USER = &H80000001
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\"&_
strComputer &"\root\default:StdRegProv")
strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings"
strValueName = "ProxYEnable"
oReg.GetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
If dwValue = 1 Then
answer=Msgbox("Proxy is currently enabled. Disable it?",36)
ProxyOn = True
Elseif dwValue = 0 Then
answer=Msgbox("Proxy is currently disabled, Enable it?",36)
ProxyOn = False
End if
If ProxyOn=False Then
If answer = 6 Then
dwValue = 1
oReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
Elseif answer = 7 Then
dwValue = 0
oReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
End if
Elseif ProxyOn=True Then
If answer = 6 Then
dwValue = 0
oReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
Elseif answer = 7 Then
dwValue = 1
oReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue
End if
End If
Have fun!
Stay Secure!
Wednesday, January 7, 2009
why procedures are important.
It's 2am as I write this blogpost and first let me give you a little history :-)
The past 2 days I spent at the hospital because I went through some excrutiating pain because of a 2mm big kidney stone. It was detected on a scan and I was instructed to drink as much fluids as possible while on painkillers and some other alleviating drugs. I also had to pee through a sift, so I would be able to find the stone if it so chose to make its exit.
(TMI ? Maybe, but bear with me ;-) )
This evening I was painfree and I was discharged from hospital (thank God, I'm back with the family again. I also chose to take my little sift home. No stone was found yet and I wanted to see that little bugger.
So, here I was, just after a shower, and I needed to pee, badly. Our bathroom is upstairs and my little sift was in the toilet room downstairs. I was juggling with the thought of peeing upstairs, without my sift, because I was really feeling tired but I told myself 'no, you HAVE to use the sift'.
I don't have to add that the stone has chosen to make its exit now. I caught it and I'm happy.
All this to tell you that, however tired or stressed you are, whatever deadline you are up against, procedures are massively important in our job. If you decide to cut corners because you know better and/or because you think that 'one time doesn't hurt', you might as well be wrong this one time. Think about it, be flexible, but don't sacrifice procedure just for the sake of it.
The past 2 days I spent at the hospital because I went through some excrutiating pain because of a 2mm big kidney stone. It was detected on a scan and I was instructed to drink as much fluids as possible while on painkillers and some other alleviating drugs. I also had to pee through a sift, so I would be able to find the stone if it so chose to make its exit.
(TMI ? Maybe, but bear with me ;-) )
This evening I was painfree and I was discharged from hospital (thank God, I'm back with the family again. I also chose to take my little sift home. No stone was found yet and I wanted to see that little bugger.
So, here I was, just after a shower, and I needed to pee, badly. Our bathroom is upstairs and my little sift was in the toilet room downstairs. I was juggling with the thought of peeing upstairs, without my sift, because I was really feeling tired but I told myself 'no, you HAVE to use the sift'.
I don't have to add that the stone has chosen to make its exit now. I caught it and I'm happy.
All this to tell you that, however tired or stressed you are, whatever deadline you are up against, procedures are massively important in our job. If you decide to cut corners because you know better and/or because you think that 'one time doesn't hurt', you might as well be wrong this one time. Think about it, be flexible, but don't sacrifice procedure just for the sake of it.
Subscribe to:
Posts (Atom)