You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
pavelpasha
changed the title
Is it posuble to read an .exe file to byte array and then execute this way?
Is it possible to read an .exe file to byte array and then execute this way?
Jul 5, 2017
pavelpasha
changed the title
Is it possible to read an .exe file to byte array and then execute this way?
Is it possible to read an .exe file to byte array and then execute it this way?
Jul 5, 2017
well you can turn it in to bytes and then make the bytes in to a file then start it.
string file2 = "bit.exe";
System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
string str = enc.GetString(file2);
StreamWriter f2 = new StreamWriter("bytes");
f2.Write(str);
f2.Close();
Console.WriteLine("bytes have been put in a file.");
Console.ReadKey();
byte[] file = File.ReadAllBytes("bytes.txt");
File.WriteAllBytes("happy.exe", file);
Console.ReadKey();
I was working on a way if make the bytes in to a txt file that this it can be made back in to a exe. but in you case you need to do this.
make sure it an exe file. i don't know if it work on other files. This code turns you exe file in to bytes and then uses the bytes to make an copy of the file.
No description provided.
The text was updated successfully, but these errors were encountered: