binaryfiles

How can I decompile Linux binaries from Windows?

情到浓时终转凉″ 提交于 2019-12-12 19:15:14
问题 How can I decompile Linux binaries (*.so) from Windows? Thanks. 回答1: You can try Boomerang; you will need to build it first from source as the provided binaries don't cover this case. If you absolutely refuse to compile anything, try the binary distribution for Linux and run it in a virtual Linux machine on Windows. 来源: https://stackoverflow.com/questions/1558370/how-can-i-decompile-linux-binaries-from-windows

Performance issue with reading integers from a binary file at specific locations

人走茶凉 提交于 2019-12-12 18:14:54
问题 I have a file with integers stored as binary and I'm trying to extract values at specific locations. It's one big serialized integer array for which I need values at specific indexes. I've created the following code but its terribly slow compared to the F# version I created before. import os, struct def read_values(filename, indices): # indices are sorted and unique values = [] with open(filename, 'rb') as f: for index in indices: f.seek(index*4L, os.SEEK_SET) b = f.read(4) v = struct.unpack(

problem writing bitmap file header in C

喜欢而已 提交于 2019-12-12 13:11:50
问题 I am trying to create a new bitmap file using C. This is a struct for the .bmp file header. #define uint16 unsigned short #define uint32 unsigned long #define uint8 unsigned char typedef struct { uint16 magic; //specifies the file type "BM" 0x424d uint32 bfSize; //specifies the size in bytes of the bitmap file uint16 bfReserved1; //reserved; must be 0 uint16 bfReserved2; //reserved; must be 0 uint32 bOffBits; } BITMAPFILEHEADER; In my program I am doing this. main() { FILE* fp; fp = fopen(

Write binary data with FileSystemObject write()

99封情书 提交于 2019-12-12 11:07:20
问题 I am developing a function in Javascript using FileSystemObject, where I just have to write in a file the binary data we are provided. This is my function. function exportFile(data) { var fso, f2; fso = new ActiveXObject("Scripting.FileSystemObject"); f2=fso.CreateTextFile("C:\\example.js",true); f2.Write(data); f2.Close(); } Nevertheless it doesn't always work (error on f2.Write(data)). I guess it is because one or both reasons: - Write function does not accept binary data (ASCII from 0-255)

General purpose utility or library for compiling/decompiling binary data files?

穿精又带淫゛_ 提交于 2019-12-12 09:56:51
问题 I have various binary file formats which I need to dump to some kind of text format, edit and then recompile (possibly to a slightly different version of the binary format). Of course I could write a bunch of utility code in C/C++ to do this kind of thing, and maybe leverage a library for the text side of things (XML or JSON or whatever), but this is a task pattern that keeps cropping up in my work and it seems to me that there probably ought to exist already some kind of general purpose tool

Portable C binary serialization primitives

一个人想着一个人 提交于 2019-12-12 07:49:37
问题 As far as I know, the C library provides no help in serializing numeric values into a non-text byte stream. Correct me if I'm wrong. The most standard tool in use is htonl et al from POSIX. These functions have shortcomings: There is no 64-bit support. There is no floating-point support. There are no versions for signed types. When deserializing, the unsigned-to-signed conversion relies on signed integral overflow which is UB. Their names do not state the size of the datatype. They depend on

Reading a binary file into ArrayList in Java

≡放荡痞女 提交于 2019-12-12 06:12:17
问题 I want to read binary file in java. I have 153(1.bin, 2.bin...153.bin) bin file. I must read that. I thought that I must use ArrayList for buffering. But I could not do that. How can I do this ? After some research, I found that way in this title(Reading a binary input stream into a single byte array in Java). There is code like below in this title. StringBuilder sb = new StringBuilder(); String fileName = "/path/10.bin"; byte[] buffer; try { buffer = Files.readAllBytes(Paths.get(fileName));

Ignore newline character in binary file with Python?

Deadly 提交于 2019-12-12 05:35:30
问题 I open my file like so : f = open("filename.ext", "rb") # ensure binary reading with b My first line of data looks like this (when using f.readline() ): '\x04\x00\x00\x00\x12\x00\x00\x00\x04\x00\x00\x00\xb4\x00\x00\x00\x01\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x01\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00\x04\x00\x00\x00\x05\x00\x00\x00\x06\x00\x00\x00:\x00\x00\x00;\x00\x00\x00<\x00\x00\x007\x00\x00\x008\x00\x00\x009\x00\x00\x00\x07\x00\x00\x00\x08\x00\x00\x00\t\x00

HTTP Error 415 Unsupported media type

天大地大妈咪最大 提交于 2019-12-12 04:18:40
问题 I am still on the same problem as: Upload binary data with HTTP PUT with jersey jaxrs-ri-2.01 But I am one step further. Now I am testing my data upload with this tool: I'm Only Resting The problem, and I don't know if it's a client or a server problem is that when I'm testing, I get HTTP 415 - Unsupported Media Type In the client: I have checked the PUT method In the body I have put one blank line (return) and in the second line i wrote test In the server, It was working until I added this

Node JS upload binary file to another server

我与影子孤独终老i 提交于 2019-12-12 03:43:37
问题 I've got an audio file which I post to a server for translation. I've managed to create a request in postman, but I do not know how to write the file to this server. Below is the code I have got so far: var http = require("https"); var options = {} var req = http.request(options, function (res) { var chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { var body = Buffer.concat(chunks); console.log(body.toString()); }); }); options{} is filled with