The tag has no usage guidance.

learn more… | top users | synonyms

3
votes
2answers
68 views

Trace a binary stream from a device file

I'm debugging a binary stream that is coming from a device file. I would like to have the output printed out in real time as hex values. So far I've used tail -f /dev/ttyAPP2 | hexdump -C but after ...
5
votes
2answers
226 views

Create the same PNG with ImageMagick 2 times: Binaries differ

I create two images that should be identical, but their binaries are different: $ convert -size 1x1 xc:white out1/w.png $ sleep 1 $ convert -size 1x1 xc:white out2/w.png $ diff out1/w.png out2/w.png ...
4
votes
1answer
46 views

Finding out binary's compiling computer name

We have recently in our workplace stumbled upon a really old binary file that originates from unknown old computer. However in order to run this binary we need to get some local resources and ...
2
votes
1answer
36 views

Is there a way to create endless stream with custom character?

I need to create an endless stream of characters like /dev/zero but I need it to spam custom character (like 'a') instead of 0x00. Is there a way to do it?
1
vote
1answer
55 views

Apply SHA256 and Base64 to string in script

I'm trying to apply SHA256 and then Base64 encode a string inside a shell script. Got it working with PHP: php -r 'echo base64_encode(hash("sha256", "asdasd", false));'. But I'm trying to get rid of ...
0
votes
1answer
48 views

How to recognize binaries installed in `~/bin`? [duplicate]

I am trying to execute some binaries manually installed in a bin directory in my $HOME (normal user). Files are present in /home/user/bin and have exec permission: $ ls -la ~/bin/ total 120 ...
2
votes
1answer
219 views

How do I repair binaries?

So, basically I was messing up with minix and qemu and I messed up too much. me@meplepl ~ $ which bash: /usr/bin/which: cannot execute binary file: Exec format error me@meplepl ~ $ file ...
3
votes
2answers
27 views

How to set binary installed by package manager as default?

I installed a newer version of tcpdump via MacPorts and would like to make it the default binary. $ which -a tcpdump /usr/sbin/tcpdump /opt/local/sbin/tcpdump For now I set an alias, but that of ...
0
votes
0answers
14 views

Where exactly is page permissions set in fs/binfmt_elf.c?

As I understand that in linux, the ELF loader (binfmt_elf.c) is the one that loads a particular binary into memory. Usually data will be RW and code segment will be RE. But where exactly in the source ...
1
vote
1answer
45 views

Find longest matching portion with in two binary files

Say I've got two binary files, each roughly 50MB, that may contain a digitally-identical portion. Is there an easy way to compare these two files, find the longest identical portion, and save that to ...
1
vote
2answers
239 views

Extract data between two matched patterns in a binary file

I am trying to extract a jpeg image from a binary text file. I want to extract all data between 0xFF 0xD8 (start of image) and 0xFF 0xD9 (end of image) inclusive. Earlier, I have successfully run the ...
4
votes
2answers
77 views

How does grep decide that a file is binary?

I have a large utf-8 text file which I frequently search with grep. Recently grep began reporting that it was a binary file. I can continue to search it with grep -a, but I was wondering what change ...
0
votes
1answer
98 views

What's the fastest way of writing 1s to a hard disk? [duplicate]

I'm currently writing 1s to a file using the following: tr '\0' '\377' < /dev/zero > /dev/sdb But this is a really slow method when I want to fill a 500GB disk. Is there a quicker way?
4
votes
3answers
122 views

Handling NULL characters in shell

Is there a portable way of handling NULL characters in shell? A typical example would be splitting the output of find ... -print0 with shell (and shell only) either in a pipe or in a command ...
1
vote
2answers
47 views

Viewing Binary not Hex

Debian jess 64 Alright let me start out by saying this maybe a very stupid,uninformed question due to my lack of understanding of binary, but I guess that's what this site is for, questions. That ...
1
vote
0answers
594 views

How do I create generalized binary tarballs for SageMath?

I would like to create a generalized binary tarball (i.e., a tar-compressed archive that contains an executable shell script for a wide range of different Linux distributions. It must be first ...
0
votes
1answer
69 views

Grep all strings from several binary files into one txt file

I've decided to play around dumping all process memory of couple utilities in order to find out, how much trace of sensitive info an attacker could theoretically obtain from app's memory. I've found ...
0
votes
3answers
261 views

is there a way to run a linux binary on OS X

Is there a way to run a linux binary in OS X? I tried to run a binary but it said it isn't executable.
2
votes
3answers
256 views

Split binary data of fixed byte offset by byte position?

I have binary data which I review by xxd -ps in hex format. I notice that the byte distance is 48300 (=805*60) bytes between two headers where the separator is fafafafa. There is the beginning of ...
4
votes
4answers
262 views

How can I convert two-valued text data to binary (bit-representation)

I have a text file with two (2) only possible characters (and maybe new lines \n). Example: ABBBAAAABBBBBABBABBBABBB (Size 24 bytes) How can I convert this to a binary file, meaning a bit ...
2
votes
2answers
44 views

Workaround for busybox head that drops NUL from data

TL;DR: Latest busybox (1.23.2) provided head is buggy and will happily drop NUL characters in the provided data. Replacing the binaries is not an option. I'm using head -[nc] -X in my scripts, is ...
2
votes
2answers
4k views

Convert binary mode to text mode and the reverse option

By the following way I convert a simple binary file into a text file od –t x1 Check.tar | cut –c8- > Check.txt What is the opposite way to convert the Check.txt to Check.tar as the original file ...
1
vote
2answers
333 views

How to obtain a plain (raw) binary dump of any file in Unix/Linux?

I have read many similar question on the Stack Exchange community but none of them address a 'clean' binary dump. I have used: xxd and sed combinations to try to obtain a clean binary dump from any ...
1
vote
2answers
195 views

ls or find option to exclude binary files

How can I list only files that aren't compiled code in the current directory? I'm reviewing the custom scripts and code on several HPUX and Linux servers before transferring them to a newer system. ...
-2
votes
2answers
73 views

How can I identify if a binary file is set-user-ID? [closed]

In Linux, how can I identify if a binary file is set-user-ID? Can I use ls -l?
0
votes
1answer
271 views

How do i write a shell script so that when i compile my c++ program it will put the binary into the Binary Directory

I have a directory called Binary and bunch of source files: ./ ├── Binary/ ├── lesson02.cpp ├── lesson04.cpp └── lesson06.cpp when I compile the source code g++ lesson01.cpp -o lesson01 I want ...
0
votes
2answers
59 views

What does mean by “Debian on track to prove binaries' origins”?

I found an article on The Register of the UK about the reproducible builds in Debian. I couldn't understand much from it. Could anyone simply this for me, please? Here's the link: Reproducible Builds
11
votes
1answer
892 views

When can I edit strings in an executable binary?

I have an executable binary; let's call it a.out. I can see the binary contains strings $ strings a.out ... /usr/share/foo .... I need to change the string /usr/share/foo to /usr/share/bar. Can I ...
1
vote
1answer
55 views

file (vdi) increase (at double) size after split and then cat operation

I'd splitted a vdi file with 7 gigabytes and then joined with cat command. The file works normally on VBox, but get 14 gigabytes after be re-joined. The exact operation was: $ split -- bytes=2000M ...
0
votes
1answer
548 views

Can't run binary executable on Ubuntu 12.04

I get the following error: ./cataclysm: command not found when trying to run this executable on a Linux server over SSH. When I run ldd cataclysm, I get: linux-gate.so.1 => (0xf7759000) ...
4
votes
3answers
523 views

Modifying binary during execution

I often come across the situation when developing, where I am running a binary file, say a.out in the background as it does some lengthy job. While it's doing that, I make changes to the C code which ...
21
votes
5answers
3k views

Generating a random password; why isn't this portable?

I want to generate a random password, and am doing it like so: </dev/urandom tr -dc [:print:] | head -c 64 On my laptop, which runs Ubuntu, this produces only printable characters, as intended. ...
1
vote
1answer
297 views

Equivalent of Java's String.getBytes() in Unix Shell (Cygwin)

Let's say I convert my string into byte array. byte[] byte sUserID.getBytes(“UTF-8”); //Convert User ID String to byte array Now I need to write a script on Shell that will have exactly the ...
0
votes
1answer
277 views

Convert serialized Java object to human readable

I have object of class class X { private DateTime dt; "constructor, set/get" } I have one instance of this object serialized in file.bin. I want to show content of `file.bin on the Linux ...
3
votes
1answer
99 views

Find/replace on block device?

Let's say I have an unmounted block device /dev/sda, and I want to replace all instances of MyPassWord with XXXXXXXXXX. (Hopefully my goal is obvious.) What's the easiest way to do this?
2
votes
1answer
446 views

How to get binary representations of strings in Shell?

I'm using openssl dgst -sha1 -binary to get hash values of my strings in binary format. (I'm using -binary flag because my version of openssl adds "stdout" before each hash value on default output, ...
4
votes
1answer
407 views

how to run a software in linux without installing it

I am trying to run Rstudio download page link. On my Windows machine, I just downloaded the zip file from zip/tarballs section and was able to run .exe without installing anything on my machine. I'd ...
1
vote
1answer
139 views

How can I teach grep to treat properties-files like text-files

Since I upgraded grep from 2.16 to 2.21 it treats .properties-files like binary files. This sucks because I like to use grep -I ... to exclude binary files from the search results and ...
0
votes
1answer
66 views

Combining parts of original Android with newer sources to create a new image [closed]

Hi I wanted to talk to the pros on the compiling and decompiling Android source and binaries respectively. Is it possible to decompile an Android OS running in a device and get its source, so that you ...
4
votes
2answers
4k views

Use curl to send binary file through POST with content-type multipart/form-data;

A post request is made to: http://www.example.com/example/ and the post data is as follows: ------WebKitFormBoundaryB8NNdk2kNdndnnn Content-Disposition: form-data; name="picture[uploaded_data]"; ...
0
votes
1answer
462 views

using CURL to transmit binary data over POST parameter

How can i use CURL to send binary data through a specific post parameter? E.g in: curl 'http://www.example.com' -H 'hi:hi' --data ...
0
votes
0answers
258 views

How to use binaries in jailshell?

I'm offering jailshell (on CentOS- whm) access to someone in order to use the folder sync tool called Unison (Some sort of bidirectional rsync) That's for the background. Unison is installed, as ...
1
vote
0answers
304 views

Can not execute Heroes of Neweth binary file

I'm trying to install Heroes of Newerth on openSUSE 13.2, KDE 4.14. I downloaded the client from official website. I checked is executable option in properties. But when i double clicked on the file ...
1
vote
2answers
802 views

Where to download binaries of coreutils?

I'm trying to install some commands on an android device (namely file and a better version of ls), and I'm looking for the ARM binaries for it (namely the 5TE architecture) but I'm unable to find a ...
0
votes
1answer
112 views

Are Linux Executables Compatible through All (x86_64) Linux Systems? [closed]

The Windows desktop proprietary softwares I see are usually distributed as statically compiled binary only files, possibly with some dlls, and the needed data files bundled in a package unpacked in a ...
0
votes
1answer
38 views

Linux/Unix Executables && FSH with libs/executing sequence

Okay, relatively new Linux User here. (Messed around with Linux for ages, looking for more depth) I know that all files in Linux can be executed if they have the executable bit. What are these ...
1
vote
1answer
1k views

unsquashfs fails

Debian 7.0, I extracted the firmware.bin image using binwalk. The extracted content is squashfs-root folder containing subdirectories, and a separate file.squashfs file. I tried unsquashfs this ...
5
votes
1answer
213 views

Representing/quoting NUL on the command line

Can \0 be used on the command line? Background For testing corner cases in GNU Parallel I was curious whether all characters were correctly quoted on the command line. Most of them are: perl -e ...
1
vote
1answer
3k views

Converting a file from ASCII to Binary

I have a series of files that are either delimited and fixed width, containing many rows of both character and numeric values like so (delimited example): Smith,Audrey,Ford,2000,21300.99 ...
4
votes
3answers
367 views

How to convert an unsigned decimal (less than 1<<32) to 4 bytes (binary) in bash?

Example: $ decimal=$(( RANDOM << 17 | RANDOM << 2 | RANDOM >> 13 )) $ echo $decimal $ printf "%08x" $decimal | xxd -r -p >bytes The result is in bytes file. Can it be done in ...