About hydra, crunch and 7-zip - linux

I want to create a password list using crunch. As you know the file will become more than 1 petabyte. I know that in 7-zip you can "archive" a file in the format of "7z" and compress it by a lot. If I create a text file then compress it to a "7z" format, then is it possible to get crunch to access the text file while it is compressed in the "7z" format and to add to the list.
Also is it possible to get hydra to read an archive in this format "7z", when you want to use a password list?

Related

How to open .nlm files? (UMLS data)

I am working with UMLS data (Unified Medical Language System) and they have zip files which contain files with .nlm extention and .md5 file (probably .md5 files for storing the keys to open .nlm files but I am not sure), and I don't know how to open them. In the notepad it shows symbols which are not readable. Can I convert .nlm files to text format or any other readable format or there are any software or libraries to see their encoded data?
I want to see the tables or data like this after I open .nlm file:
3|ENG||||||8717795||58488005||SNOMEDCT_US|PT|58488005|1,4-alpha-Glucan branching enzyme||N||
3|ENG||||||8717796||58488005||SNOMEDCT_US|FN|58488005|1,4-alpha-Glucan branching enzyme (substance)||N||
3|ENG||||||8717808||58488005||SNOMEDCT_US|SY|58488005|Amylo-(1,4,6)-transglycosylase||N||
3|ENG||||||8718164||58488005||SNOMEDCT_US|SY|58488005|Branching enzyme||N||
19|ENG||||||10794494||112116001||SNOMEDCT_US|SY|112116001|17-hydrocorticosteroid||N||
19|ENG||||||10794495||112116001||SNOMEDCT_US|SY|112116001|17-hydroxycorticoid||N||
19|ENG||||||10794496||112116001||SNOMEDCT_US|PT|112116001|17-hydroxycorticosteroid||N||
19|ENG||||||10794497||112116001||SNOMEDCT_US|FN|112116001|17-hydroxycorticosteroid (substance)||N||

how to store multiple files in one file in python?

How can I store multiple files in one file using python?
I mean my own file format not a zip or a rar.
For e.g I want to create an archive from a folder but with my own file format. ( like 'Files.HR' )
Or just storing files in one file without any dictionary or file format. ( 'Files' No file format )
You may want to use "tar" files. In python, you can use the tarfile module to write files in the file and then later extract them back into real files.
You do not have to name the file *.tar. You can name it something else related to your specific application, such as naming it Files.HR.
Please see this nice tutorial or read the official docs to see how to use tarfile.

Parse bytes of a zip file?

I am requesting a zip file from an API and I'm trying to retrieve it by bytes range (setting a Range header) and then parsing each of the parts individually. After reading some about gzip and zip compression, I'm having a hard time figuring out:
Can I parse a portion out of a zip file?
I know that gzip files usually compresses a single file so you can decompress and parse it in parts, but what about zip files?
I am using node-js and tried several libraries like adm-zip or zlib but it doesn't look like they allow this kind of possibility.
Zip files have a catalog at the end of the file (in addition to the same basic information before each item), which lists the file names and the location in the zip file of each item. Generally each item is compressed using deflate, which is the same algorithm that gzip uses (but gzip has a custom header before the deflate stream).
So yes, it's entirely feasible to extract the compressed byte stream for one item in a zip file, and prepend a fabricated gzip header (IIRC 14 bytes is the minimum size of this header) to allow you to decompress just that file by passing it to gunzip.
If you want to write code to inflate the deflated stream yourself, I recommend you make a different plan. I've done it, and it's really not fun. Use zlib if you must do it, don't try to reimplement the decompression.

Tclsh convert base64 dump into zip file

I have written a Tclsh code that will fetch a zip file content in base64 format through xml-rpc method. I am dumping that base64 data into a file using the following snippet:
#!/usr/bin/tclsh
...
set mybase64Dump [myXmlRpcCallToReturnThisDump]
set zipFilePtr [open "xyz.zip" "w"]
puts $zipFilePtr $mybase64Dump
close $zipFilePte
Zip file was getting generated with XKbytes of size, but when trying to open using 7zip it says, Is not Archive. But I copy pasted the same base64 dump in a online converter. It was giving me a proper extractable zip file.
Is it something I am doing wrongly?
You probably need to configure the output file to be binary, not ascii. The default translation for a newly opened file is "auto", which does system-specific translation of the end-of-line characters, which is not what you want for a .zip file. Configure this using fconfigure on the handle after opening it or by adding the BINARY access flag to the open command.
See http://www.tcl.tk/man/tcl8.5/TclCmd/open.htm and http://www.tcl.tk/man/tcl8.5/TclCmd/fconfigure.htm for details on the syntax.

Find data file in Zip file using microcontroller

I need a microcontroller to read a data file that's been stored in a Zip file (actually a custom OPC-based file format, but that's irrelevant). The data file has a known name, path, and size, and is guaranteed to be stored uncompressed. What is the simplest & fastest way to find the start of the file data within the Zip file without writing a complete Zip parser?
NOTE: I'm aware of the Zip comment section, but the data file in question is too big to fit in it.
I ended up writing a simple parser that finds the file data in question using the central directory.

Resources