I tried to examine the content of a .torrent file using a
$ od -c xyz.torrent
Some of the content of the file is in plain text like the information regarding the trackers, creation date, the encoding used,the length and the number of pieces but the rest is encoded. Can somebody please tell me how i can examine the torrent file so that i can decode everything.
.torrent files are bencoded dictionaries
More information
Use lstor from the pyroscope package: https://code.google.com/p/pyroscope/wiki/CommandLineTools#lstor
It pretty-prints the contents of .torrent files.
Related
I'm sorry if i'm asking something basic. I've found list of files with corresponding checkums at ftp://ftp.ensemblgenomes.org/pub/plants/release-39/fasta/helianthus_annuus/dna/CHECKSUMS.
But in my opinion checksum representation is quite uncommon. Before i saw something like 58c1c7a730ba1e90169ab95efdc39e5c ( got this string as md5sum command output on one of the files from the link). How i can convert checksums from link above to regular format?
The output looks as it is from sum or cksumcommands.
See sum wiki and cksum wiki
You can not use this data to get back a md5sum or shasum.
I am new to Linux and I'm trying to look for an ID number within a .bz2 file. Seems like a fairly straight forward requirement, however I cannot find the correct command anywhere online. I believe I need to use bzgrep.
I want to look for '123456' in the file Bulk9876.bz2
How would I construct this command?
You probably just need to tell grep that it's okay to parse that data as text:
bzgrep -a 123456 Bulk9876.bz2
If you're trying to view the compressed data (rather than decompressing it and searching the decompressed data), just use grep -a ….
Otherwise, it might make sense to verify that the desired string is even present in the file; bunzip2 it and grep -a the decompressed file. If that works, the problem is in your bzgrep instance (which is odd because it should be using the same decompression library as bunzip2).
There is numbers of tools that converts certdata.txt from here into .pem format again. However I would need to do it the opposing way: create certadata.txt from a given .pem or .der file.
Does anyone knows a tool that converts *.pem certs into the certdata.txt?
After getting a closer look of nss-tools I have found what I really needed:
nss-addbuiltin:
Read a der-encoded cert from certfile or stdin, and output
it to stdout in a format suitable for the builtin root module.
Example: nss-addbuiltin -n MyCA -t "C,C,C" -i myca.der >> certdata.txt
The file you referenced is a definition file. You generally never feed it directly to an application, instead you convert the certdata.txt into a list of certificates in .pem format.
This is what most of consumers fo:
https://groups.google.com/forum/#!topic/mozilla.dev.security.policy/J7mY_cpOyX4
http://curl.haxx.se/cvssource/lib/mk-ca-bundle.pl
https://security.stackexchange.com/questions/42946/where-can-i-find-all-ssl-ca-certificates
If you use the PEM list, then it's just as simple as adding your certificate to the end of that list.
Hi I understand that Concat is possible with Gzip function on OS File system,
i.e.
gzip -c a.txt > a.gzip
gzip -c b.txt > b.gzip
now below is also correct,
cat a.txt b.txt | gzip -c > ab.gzip # is same as
cat a.gzip b.gzip > ab.gzip
At file system this seems correct to me, but when I try to implement the same concept with node.js to concat, header (pre-gzipped content), main-content (pre-gzip), side-bar and other widgets which are pre-gzip binary data files on filesystem than it doesn't seem working for me, I can only see text content of first chunk (header) and other appended content displayed as random binary symbols.
First want to understand is it possible and if yes then how can I implement fragmented caching.
I just want to see if it is possible with compressed fragmented caching, otherwise plan B is to use plain fragmented caching and gzip content runtime.
var rs1 = fs.createReadStream('./node_fs/index/index.txt.gz');
var rs2 = fs.createReadStream('./node_fs/index/content.txt.gz');
res.write(rs1);
res.write(rs2);
Additionally, both files are compressed using gzip.exe command line and if I write only one of them than it works fine, but append doesn't work.
Your original gzip example "works" because the gunzip tool is written to handle multiple entries in a single file. It doesn't work with some browsers because they expect a single gzip entry.
See: Concatenate multiple zlib compressed data streams into a single stream efficiently
I need to write a program that read the .eml files from IIS's mail drop box, but I can't find a definitive source that tells me the encoding of the .eml files. Is there a specification somewhere that tells me the encoding of the files, or do I just have to guess/assume one?
You need to read the Content-Transfer-Encoding header. This value will tell you how the email is encoded. The most common are 7-Bit (no encoding), Quoted-Printable (where you see a lot of =HEX pairs), and base64 (which is base 64 encoding).
Based upon that header value, you decode the following body part using the specified routine.
I found my answer at en.wikipedia.org/wiki/MIME: "The basic Internet e-mail transmission protocol, SMTP, supports only 7-bit ASCII characters... "
Though it's too late to answer but eml file format nothing but a plaintext MIME (rfc822) file format for storing emails.