Questions tagged [binary]
The binary tag has no usage guidance.
317 questions
0
votes
3
answers
100
views
Append N hexadecimal numbers to a binary file with Bash
I have a Bash script that appends bytes written as hexadecimal values. I use echo to write the bytes and it works
hex="1F"
byte="\x$hex"
echo -en $byte >> "output.bin&...
-1
votes
2
answers
201
views
How to print out all printable ASCII strings contained in binary data?
How can I print out all printable ASCII strings
(e.g., longer than four chars) contained in a binary file?
0
votes
1
answer
86
views
How to view the existing files of a drive binary copy?
Greetings
I've been recently studying the concepts of compression and copying in Linux.
When I've been introduced to the dd command, I have found it quite useful, so as an exercise, I bit-by-bit ...
1
vote
2
answers
490
views
In Nix, how to make one derivation depend on another next to it?
I'm currently trying to package some closed-source software into Nix derivations. The app is distributed as a large pile of .deb files, and most of them contain libraries that the other parts of the ...
0
votes
1
answer
66
views
Detecting used API calls for an application
I need to run a proprietary C++ application under Linux and I need to understand if it contains any functions outside advertised features.
Is there a way to list all the API calls that the application ...
0
votes
0
answers
46
views
Search a binary file for a list of 500 000 binary patterns
I have a list of binary "strings" in a file delimited by newlines. I'd like to use that to search another binary file to check which of these patterns the binary files contains and at which ...
3
votes
1
answer
686
views
Circular dependency issues
Do some .deb binary files need each other to be installed and removed?
If so, how do you get around this?
What I observed was that I wanted to install Kodi on an offline PC, but I got stuck with ...
0
votes
0
answers
24
views
Directly Replacing Text in Binary File [duplicate]
I have a compiled executable (binary) file - mybin - which grep indicates contains a positive match with a given text string - Cats.
grep "Cats" mybin
Binary file mybin matches
If I use the ...
0
votes
0
answers
104
views
Running Linux commands execute hidden command to regenerate Backdoor
My CentOS server compromised, the backdoor uploaded in /var/www/html/, I have deleted the backdoor and browsed the backdoor - to be sure it's deleted - it's surly deleted, but when I run any command ...
0
votes
1
answer
214
views
Are FreeBSD binaries compatible with macOS?
Since FreeBSD and macOS (OS X) are very similar to each other, can programs written for FreeBSD run on macOS? And if a program can't, then would it be possible to make it work?
0
votes
1
answer
412
views
Shift the address in the hex file with Offset
I want to update the hexfile start address with offset. For example, i have a hex file name abc.hex and start with address 0x0000 to 0xFFFF. But I want to shift the context in the hexfile to the ...
0
votes
1
answer
44
views
How to replace stock java with downloaded binary?
In Debian Stable the latest openjdk version available is 17.
$ which -a java
/usr/bin/java
/bin/java
$ java --version
openjdk 17.0.8 2023-07-18
OpenJDK Runtime Environment (build 17.0.8+7-Debian-...
0
votes
1
answer
163
views
Which portion of boot.log files are binary?
My system keeps seemingly randomly failing to boot after a kernel update. So I am reading logs to try to determine the cause of the issue. Here is one of the boot logs:
$ sudo cat /var/log/boot.log.1
-...
4
votes
1
answer
5k
views
Cannot exceute binary: required file not found
I see that there are other questions like this out there, but the answers there did not work for me.
I am using I downloaded the Julia 1.9.2 (Linux, x86-64, glibc) prebuilt binary and tried to execute ...
0
votes
0
answers
196
views
Creating file or folder showing drwxr-x--- 2 root bin
I am not sure why i get this drwxr-x--- 2 root bin every time I create a new file or folder on an NFS share. Earlier I used to get drwxrwxrwx 2 root root.
id root
uid=0(root) gid=0(root) groups=0(root)...
2
votes
0
answers
522
views
Convert executable binary to dyamic library
Functionally, a binary (as in ELF binary which can be executed from the shell) is somewhat similar to a library in that both are files containing machine code for a particular target ABI in binary ...
1
vote
0
answers
99
views
What happened to a.out
I just started to wonder what ever happened to the original a.out binary file format and why it was superseded by ELF?
0
votes
2
answers
799
views
Grep a number of bytes before match in binary files?
I often use grep -ao ...word file.bin to look up a text content ("word") and the few characters before it; as a reminder:
-a, --text
Process a binary file as if it were text; ...
1
vote
5
answers
2k
views
Grep, but for binaries
I've got a fragment of an image file produced by data-recovery software. I suspect the complete original is somewhere on my home fileserver.
If this were a fragment of a text file, I could just grab ...
1
vote
0
answers
131
views
Can't cat, gedit, vim, nano etc. /usr/bin/proxychains (just get jibberish)
I am using Ubuntu 5.15.0-57-generic and I see many people have a problem with proxychains where they get this error:
"ERROR: ld.so: object 'libproxychains.so.3' from LD_PRELOAD cannot be ...
0
votes
1
answer
117
views
./<filename> No such file or directory
I'm trying to run a binary. But when I'm trying to run the file I'm facing the following error.
pegasus@pegasus:~/Documents/Courses/heaplab-main/house_of_force$ ./house_of_force
bash: ./...
3
votes
1
answer
126
views
Why are some instances of the same version string in objdump -T enclosed in paranthesis?
Look at the following output snippet generated by running objdump -T on libc.so.6:
000000000009f8a0 g DF .text 000000000000001d (GLIBC_2.2.5) aio_write64
0000000000119d00 g DF .text ...
0
votes
0
answers
336
views
ath10k/pre-cal wifi firmware missing
I tried installing linux on my computer. During the Detect network hardware stage, the installer warned that non-free firmware files were missing, ath10k/pre-cal-pci-0000:01:0.0.bin and ath10k/cal-pci-...
1
vote
1
answer
886
views
What does Base in objdump dynamic symbol table mean?
Consider the following truncated output from running objdump -T (Prints dynamic symbol table entries) on the GNU ls utility.
/usr/bin/ls: file format elf64-x86-64
DYNAMIC SYMBOL TABLE:
...
2
votes
1
answer
403
views
How to log binary data with GNU screen
I am using GNU screen to open a serial port and log incoming binary data to a file. The command I use is:
screen -S mySession -L -Logfile data_out /dev/ttyUSB0 115200, cs8
At some point the recording ...
0
votes
1
answer
236
views
How to make Bash not wait for EOF?
So I made a simple Bash script that can use your keyboard LEDs (numlock and capslock) to transmit data (inspired by LTT from their "Do NOT Plug This USB In! – Hak5 Rubber Ducky" video). This ...
1
vote
0
answers
39
views
DVD recorder based on freebsd, how to edit service disc
I am trying to understand what is written here and how it can be done. Maybe someone will be able to help and understand this:
https://forum.videohelp.com/threads/306345-some-problem-with-DVR560H-s-...
0
votes
1
answer
501
views
How to make a 8 bit binary value
I just implement obase=2 method to convert the decimal to 8 bit binary. but I AM not getting zeros when I convert decimals such as 1 and 2 it just output decimal 1 as binary 1 (without zeros) but I ...
2
votes
1
answer
1k
views
Why is the Image file a PE executable
I've been trying to compile a linux kernel on my own machine with the source linux-6.0-rc5, which is the latest. Everything goes well yet something haunts me. When I get the Image file under arch/...
2
votes
1
answer
2k
views
Binary returns permission denied even with 777 rights
[adela@zen ~]$ dir-open /
bash: /home/adela/.toolbox/bin/dir-open: Permission denied
The weird thing is, that both directory and binaries has 777 permisions, and binaries cannot be executed - ...
0
votes
1
answer
1k
views
Confused about memory examination using gdb?
I started reading Hacking, the art of exploitation and I am confused about some things regarding memory examination.
When I disassemble main, I get an output of all memories where the individual ...
0
votes
0
answers
203
views
How to get binary diff size of two folders
I need to know the size (in bytes) of binary difference between two folders containing hundreds of files.
ideally searching for a tool where something like xtool --recursive /path/to/folderA/path/to/...
1
vote
1
answer
579
views
Search Hexadecimal Sequence from start position until some defined number of bytes of huge Binary File (grep, sed)
In my Mac, I have this binary 'file' /dev/disk0s1 with 512GB (Really is a drive or volume according to AFPS of macOS) and I need to find this Hexadecimal Sequence 0x41, 0x50, 0x53, 0x42 for APSB (in ...
23
votes
4
answers
2k
views
How can I copy a /tmp/ directory that is created & deleted by a process?
I am investigating the behavior of a binary on Oracle Linux 9 (XFS filesystem). This binary, when called by a process, creates a directory under /tmp and copies some files to it. This directory gets a ...
9
votes
2
answers
1k
views
Split two concatenated files
I have Afile made by the equivalent of cat a.gif b.7z > Afile.
How may I split Afile into the original a.gif and b.7z files?
0
votes
1
answer
4k
views
Command curl not found, even though it is installed
First I've installed curl:
company@rb-VirtualBox:~$ apt install curl
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (...
1
vote
0
answers
223
views
Get Linux Executable Signing Certificate Information
I wanted to know if there was a way (some sort of library that I'm unaware of) that gets the signing certificate details of an executable. I know it's possible to sign a binary using openssl but how ...
0
votes
1
answer
93
views
Uniqueness of binaries across same distro
Should the common binaries on different but identical linux systems (lets say same Debian version, fully patched), have the exact same binaries across systems (matching hashes)?
Is there any known ...
1
vote
1
answer
1k
views
How can I display an image coming as a binary stream?
I would like to display an image that I am receiving from a curl command. For example, I would like to display it using Eye of Gnome. How can I do that?
Something like:
curl https://example.com/image....
0
votes
0
answers
5k
views
Convert binary file to text file
I'm struggling with a srt subtitles, which are a binary file for some reason:
file -i file.srt
file.srt: application/octet-stream; charset=binary
When opening them in kate (KDE text editor) they look ...
3
votes
1
answer
7k
views
How can I modify the strings of a binary file?
When I use strings filename, it lists all strings in a binary file. And now, I want to modify the strings that listed. But, how?
0
votes
1
answer
937
views
"EOF in backquote substitution" when trying to run a binary file
I get the following error when trying to run a binary file with the command: tmp/123.bin
tmp/123.bin: 1: tmp/123.bin: Syntax error: EOF in backquote substitution
I have no idea what could be causing ...
1
vote
1
answer
727
views
What is HIT Archive Data?
When I run file image.bin the output I get is: image.bin: HIT archive data
I'm not sure exactly what this file/archive type is and Google isn't giving me a solid answer
11
votes
2
answers
3k
views
How to print zeros and ones of a file
Long story short: how to print in a terminal the binary digits constituting a file e.g. a library .so or a simple text .txt file
PC hardware works with electrical signal (basically it's an ON/OFF ...
0
votes
1
answer
1k
views
null characters at the beginning of an ASCII log file
We have an java application that log4j2 to generate log file and have script to stop the process before restart it with another script. There is 5 minutes pause between stop and restart at the ...
1
vote
0
answers
205
views
Size of ELF function including called functions
Is there a program which is able to determine the size (in bytes) of some function in an ELF binary recursively including every function called from within that function?
0
votes
1
answer
47
views
Merging inputs on my command
I have a numeric table for each letters in enlglish. Evey letter has random number. And my command converts theese random numbers to binary codes. But it can convert just 1 letter at the same time. I ...
1
vote
1
answer
697
views
What introduce package/binary incompatibility?
Following up on Is Ubuntu LTS binary compatible with Debian?
I know Ubuntu and Debian binary packages are incompatible more often than not. I know mixing packages from different sources is generally a ...
3
votes
1
answer
605
views
Bad byte count while using hexdump
I am trying to display a binary file with records consisting of:
8 bytes unsigned int
4 bytes unsigned int
4 bytes unsigned int
4 bytes unsigned int
4 bytes unsigned int
I try to display it using ...
0
votes
1
answer
2k
views
How to execute a go binary file with crontab?
I have created a binary file from a Go script, and now I need to run it with crontab.
The binary file runs without issues executing it manually from the command line.
I am using Ubuntu from WSL.
...