#Region ------------- Login Form -----------------------
Sub mLogin_Action 'menù action
frmLogin.show 'load form
imgLogo.SetImage(fx.LoadImage(File.DirAssets, "lucClose.png"))
Dim ivLog1 As ImageView 'reset
ivLog1.Initialize("")
ivLog1.SetImage(fx.LoadImage(File.DirAssets, "load.png"))
SetGraphic(btnLoad, ivLog1)
Dim ivLog2 As ImageView 'reset
ivLog2.Initialize("")
ivLog2.SetImage(fx.LoadImage(File.DirAssets, "key.png"))
SetGraphic(btnLogin, ivLog2)
Dim ivLogH As ImageView 'reset
ivLogH.Initialize("")
ivLogH.SetImage(fx.LoadImage(File.DirAssets, "quit.png"))
SetGraphic(btnLogHide, ivLogH)
chkSave.Checked = False
If File.Exists(File.DirApp, "passwd.ini") Then
Dim strAll As String
strAll = File.ReadString(File.DirApp, "passwd.ini")
Dim seg() As String
seg = Regex.Split( "SPLT", strAll)
hwidLogin.Text = seg(0)
txtPwdLogin.Text = seg(1)
End If
End Sub
Sub btnLogin_Action
If txtAuth.Text.Contains("OK") Then
crtlhwid
Else
lblLogStatus.text = "Permission denied!"
End If
End Sub
Sub btnLoad_Action
Try
Dim job1, job2, job3, job4 As HttpJob
job1.Initialize("Job1", Me)
job2.Initialize("Job2", Me)
job2.Download("http://kerberos5.net63.net/hwid/hwid/HID3.php?id=" & hwidLogin.Text)
job3.Initialize("Job3", Me)
job3.Download("http://kerberos5.net63.net/hwid/hwid/lucOpen.png")
job4.Initialize("Job4", Me)
job4.Download("http://kerberos5.net63.net/hwid/" & hwidLogin.Text & ".cer")
Catch
Msgbox.Show(LastException.Message, "RAT4A")
End Try
End Sub
Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "Job1", "Job2"
'print the result to the logs
'Log(Job.GetString)
txtAuth.Text = Job.GetString
Case "Job3"
'show the downloaded image
imgLogo.SetImage(Job.GetBitmap)
lblLogStatus.text = "HWID checked!"
Case "Job4"
txtCert = Job.GetString
End Select
Else
Log("Error: " & Job.ErrorMessage)
End If
Job.Release
End Sub
Sub chkSave_CheckedChange(Checked As Boolean)
If chkSave.Checked = True Then
File.WriteString(File.DirApp, "passwd.ini", hwidLogin.Text & "SPLT" & txtPwdLogin.Text)
Msgbox.Show("Saved!", "RAT4A")
End If
End Sub
Sub btnLogHide_Action
frmLogin.close
End Sub
Sub crtlhwid()
Dim bb1(), bb2(), bb3() As Byte
Dim seg() As String
seg = Regex.Split( "##@@##", txtCert)
bb1 = su.DecodeBase64(seg(0))
bb2 = su.DecodeBase64(seg(1))
bb3 = su.DecodeBase64(seg(2))
Dim section1 As String
Dim section2 As String
Dim section3 As String
section1 = BytesToString(bb1, 0, bb1.Length, "UTF8")
Log("Username: " & section1)
section2 = BytesToString(bb2, 0, bb2.Length, "UTF8")
Log("HWID: " & section2)
section3 = BytesToString(bb3, 0, bb3.Length, "UTF8")
Log("Password: " & section3)
If txtPwdLogin.Text = section3 Then
mCon.Enabled = True
mDisc.Enabled = True
Msgbox.Show("Welcome: " & section1, "RAT4A")
Else
Msgbox.Show("Incorrect Password!", "RAT4A")
End If
End Sub
#End Region