i have some files name libbeet.so.3.02 , libpos.so.3.04.I think all is binary files , but i am not able to see the contain of file.is there any script to read the file contain.
I am currently implementing an upgrade system for silent upgrades in my application. I am stuck. I need the code to patch binary files. But I can't find a good third party library. My code is in C# so I would prefer a C# library, but right now I would even go as far as using a library in another language and bind it into my C# code. But I just can't find a good patch/diff library. I must be missing something. Surely there must be some libraries out there that give us the ability to patch binary files?
Before installing Fedora on my laptop I backed up my files onto a USB key. I wiped the hard disk and installed Fedora 12. I copied my files back to my home directory - but all the text files are now binary! Any ideas why this would be or how to fix it??---------- Post added at 10:54 AM CST ---------- Previous post was at 10:35 AM CST ----------Hmm it seems that only some files are binary. Looks like some .tgz files are corrupted too.---------- Post added at 11:02 AM CST ---------- Previous post was at 10:54 AM CST ----------Damn - I wonder if the files weren't completely written to the usb key before I removed it. I don't remember their being a safe mount option in Fedora 10 - but I definitely unmounted it before removing it from the laptop.
I am learning C++ and wish to include some Boost functions in my code. My machine is running Debian Linux with the pre-installed boost binarys.I have a couple of questions:How do I include the library in my C++ code as there are no cpp or h files only binary files (eg /usr/lib/libboost_regex-d.so and /usr/lib/libboost_regex-d.a)How do I comile the code. I am using DialogBlocks for creating forms using wxwidgets. The editor also compiles the code using the gcc compiler. Do I have to give an instruction to the compiler saying which file is requried and where to find it? If so, any ideas how this is done?
I have a binary value which I receive from a controller. Say this binary value is 42. Just plain hex 42. If you would look at that byte in a debugger you would see 42.Now this value hold 8 bits each indicating a high or a low output. So 0x42 = 01000010b. Which means bits 1 and 6 are '1'.When I would want to find out which bits are set and which are not in a language like C, I simply do:
Code:
mask = 0x80; if (binval & mask) {...} etc..
However I am programming in TCL, and I try to do:
Code:
set mask 0x80 if { [expr ($binval & $mask) > 0] } {...} etc...
this fails. At the moment the expr is executed, $binval is evaluated and substituted so the expression I am evaluating is
Code:
set mask 0x80 if { [expr ('B' & '0x80') > 0] } {...} etc...
Eventually I got it working by converting the $binval into a '0x42' string value, like this:
Code:
binary scan $binval c byte set byte [format "0x%0x" $byte] set mask 0x80 if { [expr ($byte & $mask) > 0] } {...} etc...[
Then the expression yields what I want. But this seems so stupid and clumsy. Isn't there a better way where I can compare two binary values without conversions?
I am looking to use PAR:acker to convert perl to some executable in Windows. Just wondering if there is an easy way (say a binary download) is available ?
CPAN has the code but I want to save sometime if possible.
I'm trying to compile a simple script for a ar71xx (bleeding edge /from snapshots) Openwrt router.I have previously compiled scripts for Kamikaze 8.09. I just copied the gcc file inside the SDK dir and used it without problems.
I'm having a problem with sed syntax. So far I can sed the HiResBoundingBox to capture the images I want and output to pdf. But now ever so often I get an illustrator file that has hexadecimal values at the start and end of the file. Imagemagick powers through this and still creates the rastorized previews I want but the gs dies using the epstopdf script to output the vector files. If I hand remove the hex on both ends of the file, both functions work fine and the file can still be managed in illustrator but if I resave it the hex comes back. It only happens on a few files plus it seems to serve no purpose as the files work perfectly without it. I cannot get the sed statement to work. I've tried a blue million variations with no luck. Copied some that I found, same result.
Start of bad eps file: ADOĆ ^@^@^@5O ^@^@^@^@^@^@^@^@^@UO ^@im^K^@yy^@^@%!PS-Adobe-3.1 EPSF-3.0^M
The way I need it to look: %!PS-Adobe-3.1 EPSF-3.0^M End of file the same: %AI9_PrivateDataEnd^M @ @ just needs to be: %AI9_PrivateDataEnd^M Tried sed -n '/%/,$p' < = blank file sed -i 's/%/,$!d/g' = same sed 's/%/,$!d/g' = same sed 's/%/,$!d' = same
I can't seem to find any proper reference to this.
i need to change a binary file, let's say to find and replace username:
find string: "/home/name/bla-bla-bla/ " new string: "/home/anewname/bla-bla-bla/ "
i can do it, for example, in emacs (hexl-mode), but interesting in writing a script instead. it will be much more better for me if i could do it automatically. is there an analog of: sed 's/string1/string2/g' ? P.S. the best way is to recompile the binary files i have, but there are no sources available.
I've got a bit of an obscure question for you to test your brains a wee bit. I'm trying to implement a search program to find areas of high density in a binary string.
Where density is the number of 1's / number of digits with a maximum number of digits being the current number in a buffer (in this example 50). So for the example the density for the whole buffer is 15/50. But the density of Buffer[14..20]=[1110001]=4/7. So if looking for areas of density = 1/3 it would find the longest sequences of density over 1/3.So in the example. Buffer[4..9]=[100101]=3/6=1/2 which is above 1/3 but it is within the Buffer[4..48]=[100101000011100010000001000100100001001011001]=15/45=1/3
I want to be able to disassemble a binary file, modify the assembly source, then assemble the modified assembly source back into a modified binary file. Purpose for this is pretty much just to play around with the Crackmes (www.crackmes.de) game.
Now, disassembly is easy, there are several tools that do it, including the standard objdump with the -d argument. However, how would you assemble an assembly source file created with objdump -d? GCC for sure doesn't want to assemble it in that format. What program, script, or arguments to GCC (none that I can think of) can be used to accomplish this? If someone also has some good tips for tools in general for Crackmes beyond what is standard in GNU/Linux I'd love to hear about it.
My hosting server does not allow exec() or system() calls, for security reasons. I can call a cgi process in two ways. From a .shtml page, i can issue a directive like code...
I have a binary file, which I need to process using my C++ application. Only thing I know is first chunk of the file is long, second chunk is int, third chunk is char etc... The binary file actually contains something like below. (which is represented in hex base).
D7 07 00 00 00 00 00 00 37 18 00 00 DE 07 ............ so on.....
I need to procees the file in the following way.
* I know the first data segment in my file is long. So it takes 4 bytes. * so I need to read the first four bytes. That is D7 07 00 00. * Then I need to reverse this as 00 00 07 D7. * Finally I need to get the decimal value of above hexa decimal line. ( 00 00 07 D7) * i.e. 00 00 07 D7 (in hex) = 7D7 (in hex- after removing leading 0 s) = 2007 (in decimal)
I am coding a http server which has to send the file(s) such as images, .avi files, .mpeg, that the client is going to request. I have been trying of sending files through sockets.
I'm searching for an algorithm to sort a binary min heap tree. That's when in root i have the smallest value in the tree. The only restriction it has, is that the parent must be smaller the its two children. i think something like quick-sort, but i don't know how to implement it.
Iam executing a shell script from my code and i need to "establish communication between shell script and my program(i..e.. my script iam executing and code should communicate each other while executing)" in one shot i want to implement IPC`s in shell script..! bye the way iam using system() call to run the shell script.
I am using centos 5, want to send a sets of binary data to other bluetooth device I know how to sent a file but dont know how to sent raw data. My case is like this I have a bluetooth device I need to send data to then after it process I need to get it back, I plan to do this all using terminal is that possible?
I need a command to search a string in a file and then to convert the next string in the same line from hexadecimal to binary. I was able to put everything in capitals. The original file can be as such:
E 2 C 1 794 T ffff E 2 C 1 787
It is not always FFFF! I am trying to do this in a file at once, not reading line by line (using while).