Sign in to follow this  
Followers 0
=sinister=

Count Binary Lines?

8 posts in this topic

I'm trying to count the lines of a compiled exe application, but the _FileCountLines function does not work with that. Does anyone know how I could do this?

Share this post


Link to post
Share on other sites



Lines are normally strings terminated by @CRLF or @LF so I wouldn't expect _FileCountLines to work on a non text file line an exe file.

Share this post


Link to post
Share on other sites

I'm trying to count the lines of a compiled exe application, but the _FileCountLines function does not work with that. Does anyone know how I could do this?

Only text file have the concept of a "line."

Share this post


Link to post
Share on other sites

Ok, well what I'm trying to do is read the last "line", or actually a string that is at the very end of a exe file

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Have a look at this tail udf from randallc or this from zorphnog. Both can handle binary files.

Edited by picaxe

Share this post


Link to post
Share on other sites

Thta UDF doesn't seem to be working too well, it gives me a windows error every time (THe one with the "Send/Do Not Send" button)

Share this post


Link to post
Share on other sites

If you are referring to randallc's example, I've updated the link to a newer version. The 2nd link to zorphnog's example definately works. Of course it only gets you the end chunk of the file which you will have to extract your expected strings from.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Alright, thanks, i'm very close to getting to the end of this. However, I looked through this UDF in a script you linked me, and it works good until it returns the string. It takes the tail and combines it to one string, however when it returns it, it like converts it into a string (I think).

--Edit--

Nevermind, simple return issue! THANKS! (I'm not too good when dealing with Binary stuff)

Edited by =sinister=

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0