воскресенье, 31 июля 2011 г.

Uninstall Symantec Endpoint Protection firewall (Teefer2) without password prompt

There is known trick to remove password prompt for disabling SEP protection and another one to disable uninstall password of SEP.

Here is batch file which can be used to uninstall firewall component of managed SEP client:

@echo off
rem Set smc_exit_test to zero to disable password on SMC stop
reg add "HKLM\SOFTWARE\Symantec\Symantec Endpoint Protection\SMC" /v smc_exit_test /t REG_DWORD /d 0 /f
rem Stop SMC
C:\PROGRA~1\SYMANTEC\SYMANT~1\smc.exe -stop
rem Delete SmcInstData to disable SEP uninstall password
reg delete "HKLM\SOFTWARE\Symantec\Symantec Endpoint Protection\SMC" /v SmcInstData /f
rem Uninstall SEP with specified install GUID
MsiExec.exe /I {AAE221D5-C3DD-4FE2-A063-C1368FE730A5} /qb RUNLIVEUPDATE=0 REMOVE="Firewall"


To get your Symantec install GUID you can use this .VBS snippet:

Const SEPName = "Symantec Endpoint Protection"
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}\\.\root\cimv2")

Set softRecords = objWMIService.ExecQuery( "SELECT * FROM Win32_Product WHERE Name=""" & SEPName & """")
For Each softRecord in softRecords
SoftID = softRecord.IdentifyingNumber
Next

MsgBox SoftID

Or via command line:
wmic product where "Name='Symantec Endpoint Protection'" get IdentifyingNumber

четверг, 30 июня 2011 г.

MySQL sys_exec UDF for 64 bit Windows

I have a 64 bit MySQL server v5.5 running on x64 Windows 2008. Today I faced with problem when I tried to add lib_mysqludf_sys.dll as UDF plugin.
This plugin works fine in 32 bit environment but not in x64:
mysql> CREATE FUNCTION sys_exec
    -> RETURNS INTEGER
    -> SONAME "lib_mysqludf_sys.dll";
ERROR 1126 (HY000): Can't open shared library 'lib_mysqludf_sys.dll' (errno: 0 )
Google didn't help so I started new project in Visual Studio and compiled it from source for x64. After few unsuccessful tries I got working dll.
Download x64 lib_mysqludf_sys.dll

суббота, 22 января 2011 г.

Teamviewer lags, Mysql doesn't connect to local machine

I got a weird problem with Windows 7 few days ago after ugrading Teamviewer 5 to version 6. It stopped to work. Almost completely. Web-version of teamviewer worked fine but not installed one. Rolling back to version 5 didn't help.
My first assumption was virus. I checked whole system from bootable CD. It was absolutely clean. Losing hope I forgot about this problem.
But today I started to work on a project which require mysql. I downloaded latest version 5.5 from mysql site and started installation. Install process went upto applying security settings and hanged. I started to investigate my network problems more deeply and found what was cause. Some time ago I played with tcp/ip autotuning settings and set it to experimental value.
Executing
netsh interface tcp set global autotuninglevel=normal
resolved my Teamviewer and MySQL issues!
So huge size of tcp receive window was a problem for few applications though I hadn't any problem with Internet connection.

четверг, 23 декабря 2010 г.

WAP54G hidden page

Just discovered a hidden page in standard firmware of WAP54G:
http://router_IP/view30512282005.asp
Page contain IP/MAC-addresses and passwords in plain format. What a nice feature...

четверг, 11 ноября 2010 г.

Windows Vista/7 QoS policy and non-domain machine

Today I had tried to setup QoS policy on my home machine running Windows 7 x64. I have two internet connections and want to use them efficiently.
The idea was to mark network packets of different applications with different DSCP value and sort it on router.
QoS policy and router configuration was easy but... it didn't work. Wireshark and tcpdump -v showed zero value for DSCP/TOS.
What was suriprise when I figured that QoS policies work in domain environment only!
Both Windows Vista and Seven use Network Location Awareness (NLA) to detect domain environment.
I googled and googled for two hours without result. What I found is event id description:

"Selective application of QoS policies based on domain or non-domain network category has been disabled on this machine. QoS policies will be applied to all network interfaces."

It pointed me out that somewhere must be a key to switch this senseless behaviour.
I looked through tcpip.sys and found it:

Key (QoS was absent by default):
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\QoS
Value name (REG_SZ):
"Do not use NLA"

I had set it to "1" and rebooted.
Now packets are marked and router can sort them out!