Find the answer to your Linux question:
Results 1 to 2 of 2
Hello guys, I have a little problem. I made a simple batch script that hides files in a JPG file. ( SourceForge.net: FileCloaker ) Here is the tiny simple source: ...
  1. #1
    Just Joined!
    Join Date
    Apr 2009
    Posts
    1

    Binary Copy / Merging two files

    Hello guys,
    I have a little problem.
    I made a simple batch script that hides files in a JPG file. (SourceForge.net: FileCloaker)
    Here is the tiny simple source:

    Code:
    7z a archive.zip *\  -r
    copy /b *.jpg + archive.zip secret.jpg
    del archive.zip
    On the second line the /b option means that the script does a binary copy.
    When you open the secret.jpg with an image viewer you see the image and when you open it with an archive program you see the files from the archive.

    Ok, before adding more functions or even making a GUI I want to make a Linux version. But there seems to be no way to perform a binary copy with the cp command so I appreciate any help from you guys out there^^

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    There is the dd command for pushing bytes around.

    Or you use the append (>>) operator which is understood by many shells.
    Code:
    cp img.jpg secret.jpg
    cat archive.zip >> secret.jpg
    PS:
    It's funny but I would prefer to pipe it through gpg before hiding it
    Debian GNU/Linux -- You know you want it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...