Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Help] yang bisa vb.net masuk pliss
#4
Code:
Imports System.IO 'Import untuk penanganan Input Output File, dsb... Imports System.Text Imports System.Security.Cryptography Public Class Form1 'API Function Private Declare Function mciSendString Lib "winmm.dll" Alias _ "mciSendStringA" (ByVal lpstrCommand As String, ByVal _ lpstrReturnString As String, ByVal uReturnLength As Long, _ ByVal hwndCallback As Long) As Long 'Variable public pada Class Form1 Dim Pass As String 'tampung password ke memory.... Dim Done As Boolean 'ada password atau belum Dim Chg As Boolean 'cek perubahan password Private Sub cmdOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdOK.Click Dim Op As StreamReader 'penanganan Read File Dim NOp As StreamWriter 'penangan Write File Dim Encrypt As String Dim SourceTStext As String If cmdOK.Text = "Cancel" Then 'Tidak jadi merubah password cmdOK.Text = "Login" cmdChange.Text = "Change Password" Label1.Text = "Password:" txtPass.Focus() Exit Sub End If If Done = False Then 'Buat File pass.txt NOp = File.CreateText(Application.StartupPath & "\pass.txt") 'Buat File NOp.Write(Encrypt(txtPass.Text)) 'Tulis File NOp.Flush() 'Bersihkan stream reader pada file NOp.Close() 'Tutup File MsgBox("Password has been created!" & vbCrLf & "Please Login Now!") txtPass.Text = "" Done = True 'Beri paramater True agar bisa langsung login cmdOK.Text = "Login" cmdChange.Visible = True txtPass.Focus() Else 'File pass.txt sudah dibuat Op = File.OpenText(Application.StartupPath & "\pass.txt") 'Buka File Pass = Op.ReadToEnd 'Baca File dan letakkan di memory datanya Op.Close() 'Tutup File If Pass = Encrypt(txtPass.Text) Then 'Password benar MsgBox("Correct Password") REM; Routine untuk un-protect CD Else MsgBox("Wrong Password!") mciSendString("set cd door open", 0, 0, 0) End If End If End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load '-----------Always On Top--------- Me.TopMost = False Dim proc As Process = Process.Start("notepad.exe") proc.WaitForExit() proc.Close() Me.TopMost = True SaveSetting("EliteSpy+", "Settings", "AlwaysOnTOp", "1") '-------------------------------- Dim NOp As StreamWriter 'penangan Write File Dim Encrypt As String Dim SourceTStext As String txtPass.Focus() NOp = File.CreateText(Application.StartupPath & "\pass.txt") 'Buat File NOp.Write(Encrypt(txtPass.Text)) 'Tulis File NOp.Flush() 'Bersihkan stream reader pada file NOp.Close() 'Tutup File MsgBox("Password has been created!" & vbCrLf & "Please Login Now!") 'If File.Exists(Application.StartupPath & "\pass.txt") = False Then 'artinya (file) password belum dibuat! (pass.txt) 'Application.StartupPath = App.Path >> VB6 If cmdChange.Visible = False Then cmdOK.Text = "Make Password!" Done = False 'beri parameter di cmdOK bahwa password blm dibuat Else cmdChange.Visible = True cmdOK.Text = "Login" Done = True 'beri parameter sudah ada password End If End Sub Private Sub cmdChange_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdChange.Click Dim Op As StreamReader Dim NOp As StreamWriter Dim Encrypt As String Dim SourceTStext As String Op = File.OpenText(Application.StartupPath & "\pass.txt") Pass = Op.ReadToEnd Op.Close() If cmdChange.Text = "Change Password" Then If Encrypt(InputBox("Old Password:")) = Pass Then Label1.Text = "New Password:" txtPass.Text = "" cmdChange.Text = "Change!" cmdOK.Text = "Cancel" txtPass.Focus() Else MsgBox("Wrong Password!") Exit Sub End If Else NOp = File.CreateText(Application.StartupPath & "\pass.txt") 'daripada ribet, mending replace pass.txt lama dengan yang baru NOp.Write(Encrypt(txtPass.Text)) NOp.Flush() NOp.Close() MsgBox("Password has been changed!") cmdChange.Text = "Change Password" cmdOK.Text = "Login" txtPass.Focus() Label1.Text = "Password:" End If End Sub Private Sub ckShow_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ckShow.CheckedChanged If ckShow.Checked = True Then txtPass.PasswordChar = "" 'tampilkan password Else txtPass.PasswordChar = "*" 'memberikan karakter "*" pada password End If End Sub Private Function GenerateHash(ByVal SourceText As String) As String Dim SourceTStext As String 'Create an encoding object to ensure the encoding standard for the source text Dim Ue As New UnicodeEncoding() 'Retrieve a byte array based on the source text Dim ByteSourceText() As Byte = Ue.GetBytes(SourceTStext) 'Instantiate an MD5 Provider object Dim Md5 As New MD5CryptoServiceProvider() 'Compute the hash value from the source Dim ByteHash() As Byte = Md5.ComputeHash(ByteSourceText) 'And convert it to String format for return Return Convert.ToBase64String(ByteHash) End Function 'Sub Encrypt(ByVal teks As String) 'Dim gxry As New Encryption.Hash(Encryption.Hash.Provider.MD5) ' Encrypt = gxry.Calculate(teks).ToHex 'End Sub End Class

tuh coding updatenya,,,

0 error, 7 warnings Bahagia

tp knp wktu dijalanin error ea??? Mentok Huwaa

help me plissssss Garing Santet
[Image: YRtWp.1.gif]
Reply


Messages In This Thread
[Help] yang bisa vb.net masuk pliss - by Wayc0de - 07-25-2011, 11:45 AM
RE: [Help] yang bisa vb.net masuk pliss - by Wayc0de - 08-03-2011, 11:55 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Ask] Aplikasi Keren gan, ada Yang bisa Bongkar Source Codenya roisbwi 25 786 10-27-2013, 08:36 PM
Last Post: Bung Ali
  [ask] ada yang bisa buat mass upload deface gak flazer 3 124 12-31-2012, 02:48 AM
Last Post: police-4njing
  [ask] ada yang source code kasir restoran badai 4 85 12-12-2012, 04:49 PM
Last Post: badai
Help_16 [ask] Para Master VB.Net Masuk mr_kancil 2 62 11-17-2012, 09:09 AM
Last Post: mr_kancil
Sarge_16 [ask] cara membuat browser seperti firefox ada yang tau gak google setan 9 198 01-09-2012, 06:15 AM
Last Post: UHD
  dimana bisa download program vb m31q 4 160 05-01-2011, 08:34 AM
Last Post: h1t4k3
Help_16 [ask] bikin form yang gini hogyz 4 215 12-23-2010, 01:52 AM
Last Post: hogyz

Forum Jump:


Users browsing this thread: 1 Guest(s)