How to open .exe files in binary

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chifos0
    New Member
    • Jan 2009
    • 2

    How to open .exe files in binary

    Can any one tell me how to open .exe files in binary so i can edit the in vb. I know you "can't" really edit it, but i am trying to make a program that randomly mutates an .exe file's binary code. i want just need to know how you open it so my program can do what i designed it to do (randomly alter some of the binary code) and how to save the binary back into the similar .exe format. lol i can almost imagine my mutated exe files, im sure most of them may crash my computer but one or two could be modified for the best lol. Thanks for all and any help you may provide. :)

    -Jose V.
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    try to open the file in richtextbox control by directly specifying the file location.

    Comment

    • chifos0
      New Member
      • Jan 2009
      • 2

      #3
      Perhaps im doing it wrong.

      i opened the exe file in the rich text box and i got this "MZÿÿ¸@¸º ´ Í!¸LÍ!This program cannot be run in DOS mode.

      $ŠùÛËë—ˆËë—ˆËë —ˆH÷™ˆÊë—ˆ¢ôžˆÊ ë—ˆ"ôšˆÊë—ˆRich Ëë—ˆPELžApIà   T0@...." weird, most of the charaters are not displayed. Anyway i use the following code to do it(only code i know to open files):
      Code:
      Dim filelocation As String
          filelocation = "C:\Documents and Settings\Owner\Desktop\mutate.exe"
          Open filelocation For Input As #1
      Do
              Input #1, Data
              RichTextBox1.Text = RichTextBox1.Text + Data + vbNewLine
          EOF (1)
          Loop Until EOF(1)
          Close #1
      is there another way to do this or do i need to insert some extra code?

      Comment

      Working...