PDA

Tüm Versiyonu Göster : VB'de PC için güvenlik code


red_hacker
21-06-05, 13:44
Private Declare Function FlashWindow Lib "user32" (ByVal hwnd As Long, ByVal bInvert As Long) As Long
Const Invert = 1
Const SWP_HIDEWINDOW = &H80
Const GW_CHILD = 5
Const GW_HWNDNEXT = 2
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Dim tWnd As Long, bWnd As Long, sSave As String * 250

Private Type RECT
left As Long
top As Long
right As Long
bottom As Long
End Type
Private Type POINT
x As Long
y As Long
End Type
Private Declare Sub ClipCursor Lib "user32" (lpRect As Any)
Private Declare Sub GetClientRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT)
Private Declare Sub ClientToScreen Lib "user32" (ByVal hwnd As Long, lpPoint As POINT)
Private Declare Sub OffsetRect Lib "user32" (lpRect As RECT, ByVal x As Long, ByVal y As Long)
Const VK_CAPITAL = &H14
Const VK_NUMLOCK = &H90
Const VK_SCROLL = &H91
Const VK_USED = VK_SCROLL
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const SWP_NOACTIVATE = &H10
Const SWP_SHOWWINDOW = &H40
Private Type KeyboardBytes
kbByte(0 To 255) As Byte
End Type
Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Long
Private Declare Function GetKeyboardState Lib "user32" (kbArray As KeyboardBytes) As Long
Private Declare Function SetKeyboardState Lib "user32" (kbArray As KeyboardBytes) As Long
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Dim kbArray As KeyboardBytes, CapsLock As Boolean, kbOld As KeyboardBytes

Const RSP_SIMPLE_SERVICE = 1
Const RSP_UNREGISTER_SERVICE = 0
Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long



Private Sub Command1_Click()
Dim a
Command1.Tag = GetSetting("guvenlik", "kacak", "girenler")
Label1.Tag = GetSetting("guvenlik", "dogru", "girenler")
If Label1.Tag = "" Then Label1.Tag = "0"

If Text2.Text = "ZMASTER" And Text1.Text = 221 Then
Timer1.Enabled = False
Timer2.Enabled = False
MsgBox "Merhaba ZMASTER" & Chr(13) & "naber senden sonra " & Command1.Tag & " kisi " & Chr(13) & " kaçak " & Label1.Tag & " erisimli kisi bilgisayari açti"
Command3.Enabled = True
SaveSetting "guvenlik", "kacak", "girenler", "0"
SaveSetting "guvenlik", "dogru", "girenler", "0"
Exit Sub
End If
If Text2 <> "CEMAL" Then
If Text2 = "" Then GoTo hatali
Text2.Tag = GetSetting("guvenlik", "kullanici", Text2)
If Text1 = Text2.Tag Then
If Text2.Tag = "" Then GoTo hatali
Timer2.Enabled = False
MsgBox "Merhaba " & Text2 & " nasılsın" & Chr(13) & "OK de ve devam et"
Form1.Tag = Val(GetSetting("guvenlik", "dogru", "girenler")) + 1
SaveSetting "guvenlik", "dogru", "girenler", Form1.Tag
Unload Me
Else
hatali:
MsgBox "Bir daha dene"
Text2.SetFocus

End If
End If
End Sub



Private Sub Command3_Click()
Unload Me
End Sub



Private Sub Form_DblClick()
Unload Me
End Sub

Private Sub Form_Load()

tWnd = FindWindow("Shell_traywnd", vbNullString)
bWnd = GetWindow(tWnd, GW_CHILD)
Do
GetClassName bWnd, sSave, 250
If LCase(left$(sSave, 6)) = "button" Then Exit Do
bWnd = GetWindow(bWnd, GW_HWNDNEXT)
Loop
SetWindowPos bWnd, 0, 0, 0, 0, 0, SWP_HIDEWINDOW
Dim client As RECT
Dim upperleft As POINT
GetClientRect Me.hwnd, client
upperleft.x = client.left
upperleft.y = client.top
ClientToScreen Me.hwnd, upperleft
OffsetRect client, upperleft.x, upperleft.y
ClipCursor client

GetKeyboardState kbOld
End Sub

Private Sub Form_Activate()
SetWindowPos Me.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE
End Sub
Private Sub TurnOn(vkKey As Long)
GetKeyboardState kbArray
kbArray.kbByte(vkKey) = 1
SetKeyboardState kbArray
End Sub
Private Sub TurnOff(vkKey As Long)
GetKeyboardState kbArray
kbArray.kbByte(vkKey) = 0
SetKeyboardState kbArray
End Sub

Private Sub Hakkimizda_Click()
Form2.Show

End Sub

Private Sub Text2_Click()
Text2 = ""
End Sub

Private Sub Timer1_Timer()
Form1.Caption = "Mehmet Karadayi Guard Systems"
FlashWindow Me.hwnd, Invert
Dim client As RECT
Dim upperleft As POINT
GetClientRect Me.hwnd, client
upperleft.x = client.left
upperleft.y = client.top
ClientToScreen Me.hwnd, upperleft
OffsetRect client, upperleft.x, upperleft.y
ClipCursor client
TurnOn VK_NUMLOCK
Sleep 100
TurnOff VK_NUMLOCK
TurnOn VK_CAPITAL
Sleep 100
TurnOff VK_CAPITAL
TurnOn VK_SCROLL
Sleep 100
TurnOff VK_SCROLL
End Sub
Private Sub Timer2_Timer()
Label5.Caption = Val(Label5.Caption) - 1
Beep
If Label5 = 0 Then
Timer2.Enabled = False
Timer2.Tag = Val(GetSetting("guvenlik", "kacak", "girenler")) + 1
SaveSetting "guvenlik", "kacak", "girenler", Timer2.Tag
MsgBox "Kaçak kullanıcı dosyasına kaydedildiniz" & Chr(13) & "hayırlı olsun"
Shell ("c:\windows\rundll.exe user,ExitWindows")
End If
End Sub

eternet
11-04-06, 13:04
Sağol Kareş Mü Teşşekkürüm

kabus77
12-02-07, 15:22
Sağol kardeşş