Advertisement
Guest User

AoB Pattern Generator

a guest
Apr 22nd, 2014
3,300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'Created by AikonCWD
  2.  
  3. Set oWSH = CreateObject("WScript.Shell")
  4. Set oFSO = CreateObject("Scripting.FileSystemObject")
  5.  
  6. T = InputBox("Enter array of bytes nº 1:")
  7. T = T & vbcrlf & InputBox("Enter array of bytes nº 2:")
  8.  
  9. X = 3
  10. While MsgBox("Do you want to introduce another array of bytes?", vbYesNo, "AoB Pattern Generator") = vbYes
  11.     T = T & vbcrlf & InputBox("Enter array of bytes nº " & X &":")
  12.     X = X + 1
  13. Wend
  14.  
  15. AoB = Split(T, vbcrlf)
  16.  
  17. F = ""
  18. W = 0
  19. X = 0
  20. For i = 1 To Len(AoB(0))
  21.     For u = 1 To UBound(AoB)
  22.         If Mid(AoB(u), i, 1) <> Mid(AoB(0), i, 1) Then
  23.             F = F & "?"
  24.             W = W + 1
  25.             X = 1
  26.             Exit For
  27.         End If
  28.     Next
  29.     If X <> 1 Then F = F & Mid(AoB(0), i, 1)
  30.     X = 0
  31. Next
  32.  
  33. Set File = oFSO.CreateTextFile("aob.txt")
  34.     File.Write "Original array of bytes:" & vbcrlf & vbcrlf
  35.     File.Write Replace(T, vbcrlf & vbcrlf, vbcrlf) & vbcrlf & vbcrlf
  36.     File.Write "Total array of bytes: " & UBound(AoB) + 1 & vbcrlf
  37.     File.Write "Total wildcards used: " & W & vbcrlf & vbcrlf
  38.     File.Write "Your AoB Pattern:" & vbcrlf & vbcrlf & F
  39. File.Close
  40.  
  41. 'MsgBox F
  42.  
  43. If MsgBox("AoB Patter Generator finished" & vbcrlf & vbcrlf & "Do you want to open aob.txt file?", vbYesNo, "AoB Pattern Generator") = vbYes Then
  44.     oWSH.Run "notepad.exe aob.txt"
  45. End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement