Tool to Fix Yabinary File
Project description
change log
Installation
PyPI
The recommended process is to install the PyPI package, as it allows easily staying update.
$ pip install fixYabinary
github
Download from https://github.com/tkmru/fixYabinary/. Let’s push star!!
Usage
look(file_path)
print Binary like hexdump command.
>> import fy >> fy.look("./test.png") 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 0x000000 00 00 00 00 49 45 4e 44 ae 42....
It can be used in command line.
$ fy -l test.png
get(file_path, option)
>> import fy >> fy.get("./test.png") 0000000049454e44ae42.... >>fy.get("./test.png", "f") 00 00 00 00 49 45 4e 44 ae 42....
write(file_path, binary, option)
>> import fy >> fy.write('test','01ff4c') >> fy.get('test') u'01ff4c' >> fy.write('test',['01','ff','4c'],'l') >> fy.get('test') u'01ff4c'
extend(file_path, new_file_path, hex, bytes, option)
>> import fy >> fy.get("./test.png", "./extended", "00", 3) Succeeded in making ./extended. # 000000 + ./test.png's Binary Data + 000000 in ./extended >> fy.get("./test.png", "./extended", "00", 3, "t") Succeeded in making ./extended. # 000000 + ./test.png's Binary Data in ./extended >> fy.get("./test.png", "./extended", "00", 3, "b") Succeeded in making ./extended. # ./test.png's Binary Data + 000000 in ./extended
It can be used in command line in case option is None.
$ fy -e test.png extended 00 3
identify(file_path)
identify file type in file. return file type.
>> import fy >> fy.identify("./extended") ./expanded include following FILE SIGNATURES HEADER pdf: 10 bytes - 13 bytes jpg: 131076 bytes - 131078 bytes, 152310 bytes - 152312 bytes, 1352263 bytes - 1352265 bytes FOOTER pdf: 2340568 bytes - 2340573 bytes, 2340568 bytes - 2340574 bytes jpg: 32981 bytes - 32982 bytes, 79754 bytes - 79755 bytes
It can be used in command line.
$ fy -i extended
extract(file_path, new_file_path, start_address, end_address)
>> import fy >> fy.extract("./extended", "./result", 4 , 124) Succeeded in making ./result
and auto detect file in file, and write it into new file.
>> import fy >> fy.extract("./extended", "./result") Succeeded in making ./result1.png Succeeded in making ./result2.png Succeeded in making ./result2.jpg
It can be used in command line.
$ fy -r extended result 4 124 # set start_address and end_address $ fy -a extended result # auto extract file in file $ fy -a extended # if new_file_path is None, auto set ./result to new_file_path
License
MIT License
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copyright (c) @tkmru
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file fixYabinary-0.2.9.tar.gz
.
File metadata
- Download URL: fixYabinary-0.2.9.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1fb7f2aaa3651974cef887a8fe0dfde007a662e4372ccf21a1634760f0320947 |
|
MD5 | 1e2e4556b3ff60c686718ffee603c4cd |
|
BLAKE2b-256 | d6aa53424aa3da1498ec98bca04f28aeb8315cfc63da762b8fd530ac54d6b103 |
File details
Details for the file fixYabinary-0.2.9-py3-none-any.whl
.
File metadata
- Download URL: fixYabinary-0.2.9-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6be84ec786bcf8b5c6ebab19a9c00f625b55d2df2f9f9b594fb7e2e34b9131ea |
|
MD5 | 087ef200d5d05dce88c4b8fbd63c6ff8 |
|
BLAKE2b-256 | 859b3d7198e982a1e6ab4166707369c0786c2a0d4e841799bf7f9e8daf94c1ad |
File details
Details for the file fixYabinary-0.2.9-py2-none-any.whl
.
File metadata
- Download URL: fixYabinary-0.2.9-py2-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 748dec5992360d27bd99a58b7286743209f81d1cc493a6f719d97e2c874859e2 |
|
MD5 | 07556e56ec8b3e7ac8d835c37a2ead5f |
|
BLAKE2b-256 | 710cf15201dceb6fb008ae87d7f816236bcea104c245e459c8e6ac4c5248abe8 |