Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C# 

[C#] Efficient Read EoF Function

i tries my code on process explorer and i got 3229 byte[] with urs i got 6008 byte[]
the question is what function is not work my / urs
his code working just fine i check it
my mistake work on .net files Omg
and process explorer is not .net file
EDIT :: i liked this code i added it to my class. with source link + right credit.
Wow thanks very much, this is very short and efficient

But how can I use this in my crypter? First checking EOF and, if there is if then: ???
And also doing something with the EOF in the Stub?

After a quick search (btw Im using CodeDom, but it should be the same)
The steps: read EOF, crypt file, write it back to the file.
And quote of Vorfin
"Well, since EoF Preservation is a Function on the Builder, not the Stub, it doesn't matter if you use CodeDom or not. "


Build is crypting the file
Read Bytes, Convert to string, Encrypt, Write with CodeDom

Edit: this is not the good way
Code
//Byte[] norm_file = System.IO.File.ReadAllBytes(i.Text); // Reads all bytes <This worked
    Byte[] norm_file = ReadEoF(i.Text);

Can anyone offer some help?
(Apr 7, 2011 12:15 PM)Zer0Fact0r Wrote:  Your (ported) code loads the contents of the executable into memory (File.ReadAllBytes). Mine doesn't.

its still not explain the diffrent in the bytes []
in .net file it work like charm ... in other native files
i see big diffrent [6000 and 3000 its big diffrents]
and string its also weird ... with my class i get readable string
with this func i get unreadable string
ur methood work only on .net files, check it and see
mu methood work only with native with .net it fail

Anybody that can refere me or post a writeeof function that belongs to this read function?
Else, Its useless

File.AppendAllText("lol.exe", "123456");

Console.WriteLine(Encoding.ASCII.GetString(ReadEoF("lol.exe")));

// writes "123456" to the console

This is with a console, but a crypted server for example is different, Actually thats the thing im searching (for days)
Thanks for the unput though ..
Anyone?
write to file
File.AppendAllText("lol.exe", "123456");
read the eof
msgbox(Encoding.ASCII.GetString(ReadEoF("lol.exe")));

the same for any file

But what you are basically doing now is:
Make a file with name: lol.exe and eof: 123456

Then you read it and show it in a msgbox, console or whatever.

but this is not writing to a crypted file on the desktop for example right?

File.AppendAllText("cryptedfile.exe", "ReadedEofdata");
If its like above , I get it
delete all ur reply and put just this

File.AppendAllText("cryptedfile.exe", "ReadedEofdata");
If its like above , I get it
Hmm its very strange and not working >.<
byte[] EOFbytes = ReadEoF(i.Text);
EOFstring = System.Text.Encoding.ASCII.GetString(EOFbytes);
if (checkBox1.Checked)
{
File.AppendAllText(Path, EOFstring);
}
EDIT LINE: Path is the path with SFD
I crypted several things and each output size stays exactly the same which is result of failed EOF-adding I think
u really dont know what u doing
File.AppendAllText(Path, EOFstring);
u add the same "EOFstring" and u want to get different output

Im not adding the same EOFstring, because as you can see in my previous post
it says ReadEof(i.Text) --> i.Text = the path of the file that I want to crypt.
And for writing it:
File.AppendAllText(Path, EOFstring); --> Path is the Path of the SFD e.g. Build(sfd.FileName);

Ill edit previous post Path have to be SFD instead of OFD, sorry my mistake
But then still .. it should work


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by JoseCmanXDIIMar 7, 2022 03:37 AM 10 514 Mar 7, 2022 03:37 AM
Last Post: JoseCmanXDII
[C] by FhackMar 2, 2022 03:52 AM 4 307 Mar 2, 2022 03:52 AM
Last Post: Fhack
[Python] by SkunT3lloJun 29, 2021 01:59 PM 2 193 Jun 29, 2021 01:59 PM
Last Post: SkunT3llo