Tag Info

New answers tagged

0

Since file doesn't recognize it, the vendor probably used a custom SquashFS magic signature. I expect that unsquashfs is also giving you an error about not being able to find a valid superblock. Give sasquatch a try; it's a modified version of unsquashfs that attempts to support such vendor hacks.


4

When executing a command, the list of arguments is a list of pointers to NUL terminated strings passed to the execve() system call (just like the environment variables which is the other list of NUL-terminated strings passed to execve()). As a result, arguments and environment variables of executed commands cannot contain the NUL character. Exception to ...


1

This displays all high characters as <xx>: set encoding=latin1 set isprint= set display+=uhex Any single-byte encoding will work, vim uses ASCII for all lower chars and has them hard-coded as printable. Setting isprint to empty will mark everything else as non-printable. Setting uhex will display them as hexadecimal. Here is how the display changes ...


0

You could always go for the gold and drop down into C or ASM. If you are working with raw binary, just bounce it straight off the register. You are 'already there'.


3

Please note, that on the file system level, there is no difference between ascii and binary files. An ascii or text file is just a binary file containing bytes that are human readable (or control commands like LF=new line). To display the stored bytes in binary form, you can use xxd (part of vim): xxd -b INPUTFILE | cut -d" " -f 2-7 | tr "\n" " " To ...


1

dc can take an arbitrary input radix and output on an equally arbitrary output radix. You communicate with dc by handing it first a value (or string of values separated by whitespace) and next a command for handling the value. dc defaults to a base 10 radix for both input and output. For example, to convert arbitrary decimal values to binary (or, at least, ...


3

You can use the printf builtin to emit bytes given by octal codes. x=1193046 printf "$(printf "\\%03o" $((x>>24&255)) $((x>>16&255)) $((x>>8&255)) $((x&255)))"


2

You can use perl: $ perl -e 'print pack "I>", shift' $(( RANDOM << 17 | RANDOM << 2 | RANDOM >> 13 ))



Top 50 recent answers are included