binary

Detecting used API calls for an application

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 makes granted it doesn’t use Linux syscalls and only uses standard stdc++ …

Total answers: 1

A binary file exists but shell says no such file

A binary file exists but shell says no such file I’m using the Ubuntu in UserLAnd on an android. I just installed from the Android SDK Manager sdkmanager cmake 3.18.1. Now, I can see the cmake executable from its directory cmake/3.18.1/bin byls, but when I run ./cmake, bash returns bash: ./cmake: No such file or …

Total answers: 1

What does Base in objdump dynamic symbol table mean?

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: 0000000000000000 DF *UND* 0000000000000000 (GLIBC_2.3) __ctype_toupper_loc 0000000000000000 DF *UND* 0000000000000000 (GLIBC_2.2.5) getenv 0000000000000000 DO *UND* 0000000000000000 (GLIBC_2.2.5) __progname 0000000000000000 DF …

Total answers: 1

How to make Bash not wait for EOF?

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 is the script I have: #!/bin/bash for i in `cat /dev/stdin …

Total answers: 1

Binary returns permission denied even with 777 rights

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 – permission denied. There is a ~/.toolbox/bin directory, ls -la: drwxrwxrwx 3 adela adela 4,0K 14. zář 18.34 ./ drwxr-xr-x 10 adela adela …

Total answers: 1

Mean of wc -l in grep command

Mean of wc -l in grep command Is the wc -l showing how many times the search string is found in the binary file? -l, –lines print the newline counts (I think a newline is an empty line?) grep –binary-files=text ‘postal_code77586’ formhistory.sqlite | wc -l andy@7 ~/Downloads> grep –binary-files=text ‘postal_code77586’ formhistory.sqlite | wc -l 1 …

Total answers: 2

How can I copy a /tmp/ directory that is created & deleted by a process?

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 randomized name each time …

Total answers: 4

How do I create binary file with certain value?

How do I create binary file with certain value? I need to create a binary file that is filled only with 11111111. I only know how to create zero-filled binary with dd if=/dev/zero bs=18520 count=1 Could you please say to me what a command in pipeline should I use to fill the bin with 1? …

Total answers: 3

Why do i get binary output using curl

Why do i get binary output using curl Not sure if it is ok to share the website I tried to get its source, but I think it is necessary for a better explanation. And I apologize if it’s not in advance The command: curl -k -L -s https://www.mi.com The output was binary data for …

Total answers: 4

How to fix onedrive corrupt zips with a bash script

How to fix onedrive corrupt zips with a bash script Currently onedrive generates zip files that are broken to most software. https://www.bitsgalore.org/2020/03/11/does-microsoft-onedrive-export-large-ZIP-files-that-are-corrupt As we can see here, the solution is to use a hex editor. Since I have lots of large files, I want bash script solution…is it possible? This is a test file freely …

Total answers: 1

Diff of two similar big raw binary files

Diff of two similar big raw binary files Let’s say I have a 4 GB file abc on my local computer. I have uploaded it to a distant server via SFTP, it took a few hours. Now I have slightly modified the file (probably 50 MB maximum, but not consecutive bytes in this file) locally, …

Total answers: 5

What's the right way to base64 encode a binary file on CentOS 7?

What's the right way to base64 encode a binary file on CentOS 7? I’m using CentOS 7 with bash shell. I thought base64-encoding a binary file would be as simple as [rails@server lib]$ cat mybinary.file | base64 > /tmp/output.base64 However, I notice when I look at the file length, it’s not a multiple of four …

Total answers: 3

Symbol table in the .data section of ELF

Symbol table in the .data section of ELF I’m trying to understand how does symbol tables relate to the .data section in ELF. First some assumptions that I’m using as ground to start with. A symbol is a human readable (or “as written in the source file”) representation of a function or a variable that …

Total answers: 1

How to reverse the content of binary file?

How to reverse the content of binary file? I was solving a challenge where I found a data file with no file extension. The file command shows that it is a data file (application/octet-stream). The hd command shows GNP. in the last line. So if I reverse this file then I will get the .PNG …

Total answers: 5

What is meant by "locally installed package" in the world of Unix?

What is meant by "locally installed package" in the world of Unix? I’ve been scratching my head over the File System Hierarchy Standard recently and in numerous occasion, when talking about the /usr/local directory, I came across the term “locally installed packages”. Could someone please explain what is exactly meant by “local” in this context? …

Total answers: 2

What's the difference between a binary file and a library?

What's the difference between a binary file and a library? I’m trying to understand the Filesystem Hierarchy Standard. I have looked up both binaries and libraries, and as I currently understand it: binaries are files of computer-readable code in binary format, that control the CPU and processor directly with bits. libraries are functions usable by …

Total answers: 1

Creating a program in bin

Creating a program in bin I’ve compiled linked and created a program in C++ now I have foobar.out I want to be able to put it into the bin directory and use it like system wide commands e.g. ssh, echo, bash, cd… How can I achieve that? Asked By: GabeTheApe || Source Copy your executable …

Total answers: 5

Editing binary streams containing 'x00' bytes

Editing binary streams containing 'x00' bytes Using just shell tools, how can a binary stream containing NULLs (0x00 chars) be edited keeping the 0x00 chars in the output stream ? The edit needs to replace a char in a specified position for another char (in the following example by the char ‘|’), like as: dd …

Total answers: 3

Using binary data as a parameter in bash – any way to allow nuls?

Using binary data as a parameter in bash – any way to allow nuls? So I’d like to pass the first 512 bytes of binaryFile.dd as the second parameter to myProgram but bash strips out all the NUL chars. Is there any way to avoid this in bash or am I on a hiding to …

Total answers: 3