Programming :: Patch Binary Files From Different Library?

Jul 2, 2010

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?

View 8 Replies


ADVERTISEMENT

Programming :: Finding A Utility To Combine Two Or More Binary Files Into A Single Binary File?

May 5, 2011

Is there any Linux utility to combine two or more binary files into a single binary file ?

View 7 Replies View Related

Programming :: See The Contain Of Binary Files?

Aug 4, 2010

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.

View 5 Replies View Related

Programming :: Version Info Coded Into ELF Binary / Author And Company Name Into ELF Binary?

Nov 30, 2010

How to coded version info and other information likes author and company name into the ELF binary?

I prefer the put the version info during build step.

View 5 Replies View Related

Programming :: Reading API Files From SO Library

Jul 27, 2010

If we have a .so library elf in linux, will it be possible to find out the APIs supported by it. Or in other words, the functions that can be used along with the argument types and return type.? Note that we dont have any other header files or documentations related to the library.

View 5 Replies View Related

Programming :: Put Header Files For A Shared Library?

Feb 26, 2010

I have written a simple library and ended up with a .so file. I have a header file from writing the code that describes how to use the functions in the source code I have written. I think this .h files needs to be available to other programs that access this code.

I have seen lots of tutorials on how to copy the .so file to the relevant directories and make links with the version number. What I can't find is where to put the header file so that any programs I write to use my new library can access the header.

Hope this makes sense. For example, I might use <stdio.h> normally, I will need to access <mylibrary.h> once mylibrary.so is loaded (as far as I understand!)

It's weird, I've been using C compilers for embedded processors over ten years now and never given a second thought to how libraries and headers work behind the scenes!

View 6 Replies View Related

Programming :: Find Sys/types.h File / Library Files?

Mar 24, 2009

can anyone provide me with the path where i can find the library files. stdio.h, sys/types.h.......

View 4 Replies View Related

Programming :: Find Source Code Of C Library Files In Ubuntu?

Feb 26, 2009

Where do i found source code of c library files in ubuntu.

View 2 Replies View Related

Programming :: SDL Static Library - Shared Library ?

Apr 7, 2009

I'm reading about shared, static, and dynamic libraries. What is SDL? Is it static, shared, or dynamic?

I always thought a library would be a lot of .h and .cpp files compiled separately into .o files and then if you compiled your own program you could use the -l parameter to link the library and it was all compiled together. Now I'm not so sure.

I don't even see any SDL .cpp files in my system anywhere. All I have are lots of SDL .h files in /usr/include/SDL and I don't really understand the code in them.

I'm making a wild guess here: SDL is a shared library. SDL itself is NOT compiled into my program, therefore SDL must be on any system my program tries to run on. When I compile and link SDL all it needs is the header files to know what SDL function and objects it can use. And then on every system it uses an already compiled SDL shared library thingy somewhere.

So... where is that part of SDL? All I can find are header files.

I'm thinking the advantage of shared libraries is that someone could say update SDL on their own system and take advantage of the new features without having to download new executables with the new version of SDL compiled into them for every program that uses SDL.

So if I'm making an editor and a game engine and they both use a lot of the same .cpp and .h files that I wrote and I'm tired of updating one and then the other and I need to turn them into a library, then a shared library might be kind of a silly solution. I could just make a static library. Right? Because it's not SDL. Nobody else is ever going to use this library.

View 6 Replies View Related

General :: List/find All Regular Files In All Subdirectories Excluding Binary Files

Oct 5, 2010

I know I can do find . -type f, but that includes binary file and I couldn't find a way to exclude them with find

View 4 Replies View Related

Programming :: Convert A Dynamic Library (filename.so) To A Static Library (filename.a)?

Nov 18, 2009

How can we convert a dynamic library (filename.so) to a static library (filename.a) using gnu gcc . Can we get a static library form a dynamic library . I saw a few post in which the conversion form a static library to a dynamic library is mentioned but, unfortunately, not the other way.

View 4 Replies View Related

Fedora :: Compression Ratio For Text Files / Binary Files

Apr 15, 2011

Fedora provides several compression techniques. E.g tar, tar.gz, zip etc. I want to know which among them provides

1. the best compression ratio for text files

2. the best compression ratio for binary files

3. fastest compression

View 6 Replies View Related

Fedora :: 12 Restored Files From USB Key - Source Files Are All Binary?

Feb 11, 2010

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.

View 1 Replies View Related

Programming :: Run Leach_makefile-2.27.patch With Ns2

Feb 24, 2010

i am trying to find out who may have leach_makefile-2.27.patch, i am trying to run the leach protocol on my machine but i need that patch in order to run it with ns2.

View 3 Replies View Related

General :: Apply Kernel Patch - Couldn't Find File To Patch

Apr 8, 2011

I just want to upgrade my Slackware 13.1 kernel (2.6.33.4) to the latest stable kernel from kernel.org (2.6.38.2). I have never done anything like this and I am a Linux newbie, so I would appreciate a "Kernel Patching for Dummies" version if possible. I did do a search on this forum and most of what I read was over my head. I found an FAQ on kernelnewbies.org on "How To Apply A Patch" but when I attempted what they suggested, it said it couldn't find the file to patch at line 5 and asked me which file to patch. So I CTRL-Z'd out of there and came here. Here's what I tried:

[code]...

View 14 Replies View Related

Ubuntu Servers :: Unable To Patch The Files

Feb 8, 2011

I generated a patchfile of 2 directories using this command:

Code:

diff -ur source-20110125 source > mailpatch3.patch

Now I would like to apply the patch, doing this:

Code:

patch -p1 < mailpatch3.patch

But it then asks me for the file to patch. Why? Something that looks strange to me in the patch file: there are a lot of "common subdirectories" lines. Like this:

Code:

Common subdirectories: source-20110125/ac_depository and source/ac_depository
Common subdirectories: source-20110125/ac_depository_jar and source/ac_depository_jar
Common subdirectories: source-20110125/_backoffice and source/_backoffice

[code]...

View 2 Replies View Related

Programming :: Syntax Not Clear In A Kernel Patch?

Apr 2, 2010

I was going through init/calibrate.c.url

I am not clear with use of + sign before function names. If any one here is aware of this syntax let me know.
They have used + and - signs before some lines I am not sure of what they are?

View 2 Replies View Related

Programming :: Using Binary C++ Libraries?

Feb 21, 2011

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?

View 4 Replies View Related

Programming :: Binary Not Running From Php?

May 4, 2011

I have written a c program. And compiled it to make a binary. Now when i try to call this binary from php page, it is not being executed.

View 14 Replies View Related

Programming :: TCL AND Operator (&) On A Binary Value?

May 1, 2010

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?

View 14 Replies View Related

Programming :: Patch Command: Hunk #1 Succeeded At 25 With Fuzz 1

Oct 21, 2010

I am beginning to start to work with compiling and I get some confusing output adding patches to sourcecode (xosview-1.8.3). (The patch is for suppressing warnings while running the make command : deprecated conversion from * char to ** char ) Xosview compiles without the patch. The patch itself contains 17 files to add mostly const char instead of char. It is one single file containing also files in one subdirectory.
While running `patch < PATCHFILE.patch I had to copy'n'paste the filenames of the subdirectory to the terminal to keep it going. To get it going without much manual input I split it up for the two directories. I got the original patch and both splitted patches succeeding but with confusing output like :

patch unexpectedly ends in middle of line Hunk #2 succeeded at 78 with fuzz 1.

or just

patching file nfsmeter.h patch unexpectedly ends in middle of line # I splitted the original patch to every 17 files and this kind of output I get now at almost every patchfile. I downloaded patch source from debian
and running `pfind` (Puppy-linux speciality .sh) for search text in files showed off patch.c

Quote:
if (verbosity != SILENT)
say ("Hunk #%d FAILED at %s.
", hunk,
format_linenum (numbuf, newwhere));
} else {
if (verbosity == VERBOSE
[Code]........

As you can see the patch is working but what would I have to add to the patch? I added more newlines , added all lines to close a "{" if the patched line was inside ( also added "}" ), adjusted the path at the diff -uraNd /PATH/ -line, even deleted the diff line.

View 8 Replies View Related

Programming :: Where To Get A Windows Binary For PAR::Packer?

Nov 4, 2010

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.

View 6 Replies View Related

Programming :: Binary File Cannot Be Found?

Jan 28, 2010

I get this error when I run the program that i created using eclipse.How to fix this?

View 3 Replies View Related

Programming :: Cannot Execute Binary File

Feb 11, 2011

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.

View 4 Replies View Related

Programming :: 'strings' Binary From Binutils - How To Use It

Jul 14, 2010

it is about 'strings' binary from binutils. I recently wanted to test what it does and how it works. The best I did was this:

Code:

#!/bin/sh
PROGRAM="
int main()
{

[code]....

Ok, from the output I don't get it.Can someone show me in a simple script, what is 'strings' good for ?

View 10 Replies View Related

General :: Compare Binary Files In System?

Mar 29, 2010

I need to compare two binary files and get output in form

for every different byte. So if file1.bin is code...

what is the easiest way to accomplish the goal? Standard tool? Some 3rd party tool?

View 5 Replies View Related

Software :: Sed Syntax For Binary Wrapped EPS Files

Oct 8, 2010

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.

View 1 Replies View Related

Programming :: Search And Replace In A Binary File?

Aug 11, 2010

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.

View 5 Replies View Related

Programming :: Algorithm For Binary Frequency Search?

Jul 16, 2010

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.

E.g.

Code:

[0001001010
0001110001
0000001000
1001000010
0101100100]

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

View 5 Replies View Related

Programming :: Unable To Disassemble A Binary File?

Apr 15, 2011

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.

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved