رتبه موضوع:
  • 25 رای - 2.92 میانگین
  • 1
  • 2
  • 3
  • 4
  • 5
vb.net AntiVm new method
#1
this was inspired from a none functional code i reworked it and come to this.

سورس کد انتی وی ام (ماشین مجازی ) به زبان وی بی دات نت

کد:
Function VmCheck() As Boolean



    Dim str20 As String = Environment.UserName



    Dim enumerator As IEnumerator

    Dim str19 As String = "SELECT * FROM Win32_VideoController"

    Dim arguments As Object() = New Object() {str19}

    Dim copyBack As Boolean() = New Boolean() {True}

    If copyBack(0) Then

      str19 = CStr(Microsoft.VisualBasic.CompilerServices.Conversions.ChangeType(System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(arguments(0)), GetType(String)))

    End If

    Dim objectValue As Object = System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Interaction.GetObject("winmgmts:", Nothing), Nothing, "ExecQuery", arguments, Nothing, Nothing, copyBack))

    Try

      enumerator = DirectCast(objectValue, IEnumerable).GetEnumerator

      Do While enumerator.MoveNext

        Dim left As Object = Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue(enumerator.Current), Nothing, "Description", New Object(0 - 1) {}, Nothing, Nothing, Nothing)





        If InStr(left, "VM Additions S3 Trio32/64") Then

          VmCheck = True

          MsgBox(left)

          Exit Function

        End If

        If InStr(left, "S3 Trio32/64") Then

          VmCheck = True

          MsgBox(left)

          Exit Function

        End If

        If InStr(left, "VirtualBox Graphics Adapter") Then

          VmCheck = True

          MsgBox(left)

          Continue Do

          Exit Function

        End If

        If InStr(left, "VMware SVGA II") Then

          VmCheck = True

          MsgBox(left)

          Exit Function

          Continue Do

        End If

      Loop



      VmCheck = False

      Exit Function



    Finally



      If TypeOf enumerator Is IDisposable Then

        TryCast(enumerator, IDisposable).Dispose()

      End If



    End Try







  End Function
http://www.amshop.ir



ای ام شاپ را در اینستگرام دنبال کنید

ای ام شاپ رو در کانال تلگرام دنبال کنید



This forum uses Lukasz Tkacz MyBB addons.
پاسخ


پرش به انجمن:


کاربران در حال بازدید این موضوع: 1 مهمان
<------> <____> <<<<----------------->>>> <<<<--->>>>>
This forum uses Lukasz Tkacz MyBB addons.