Nytro Posted August 14, 2010 Report Posted August 14, 2010 '-----------------------------------------'Detect VMWare'Tested : VNWare 6.0 -> 7.0'Coder : DungCoi (VirusVN.com)'Email : dungcoivb@gmail.com'-----------------------------------------Private Type DISPLAY_DEVICE cb As Long DeviceName As String * 32 DeviceString As String * 128 StateFlags As Long DeviceID As String * 128 DeviceKey As String * 128End TypePrivate Declare Sub GetSystemInfo Lib "kernel32" (lpSystemInfo As SYSTEM_INFO)Private Type SYSTEM_INFO dwOemID As Long dwPageSize As Long lpMinimumApplicationAddress As Long lpMaximumApplicationAddress As Long dwActiveProcessorMask As Long dwNumberOrfProcessors As Long dwProcessorType As Long dwAllocationGranularity As Long dwReserved As LongEnd TypePrivate Declare Function EnumDisplayDevices Lib "user32" Alias "EnumDisplayDevicesA" (Unused As Any, ByVal iDevNum As Long, lpDisplayDevice As DISPLAY_DEVICE, ByVal dwFlags As Long) As BooleanSub Main() Dim strVGA As String strVGA = getVGACard If InStr(1, LCase(strVGA), "vmware") > 0 Then MsgBox "Dze dze. VMWare", , "VirusVN.com" Else MsgBox "I'm not running on VMWare :P", , "VirusVN.com" End If EndEnd SubPublic Function getVGACard() As String Dim DD As DISPLAY_DEVICE DD.cb = Len(DD) If EnumDisplayDevices(ByVal 0&, 0, DD, ByVal 0&) Then getVGACard = Left$(DD.DeviceString, InStr(1, DD.DeviceString, Chr$(0)) - 1) Else getVGACard = "" End IfEnd Function Quote