From be27acef81a1c3523c05d1400b8d8b73605f215f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Jorge=20D=C3=ADaz=20Monterroso?= Date: Sun, 25 Feb 2024 12:51:44 -0600 Subject: [PATCH] docs: add requirements.txt for dependencies Add to readme.md documentation for pre-use installation. --- README.md | 43 +++++++++++++++++++++++-------------------- requirements.txt | 7 +++++++ 2 files changed, 30 insertions(+), 20 deletions(-) create mode 100644 requirements.txt diff --git a/README.md b/README.md index d14f185..a061fc9 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,38 @@ -# dolphin_state.py +# dolphin-state.py -Reads the `DolphinStoreData` struct from `dolphin.state` files. +Reads the `DolphinStoreData` struct from `dolphin.state` files. ## Usage -### Reading +Install the required packages with `pip3 install -r requirements.txt` -`python3 dolphin_state.py ` +### Reading -### Writing +`python3 dolphin-state.py ` + +### Writing **icounter**: Contains the amount of EXP flipper has **butthurt**: Level of happiness flipper has - `BUTTHURT_MAX = 14` -With the `--icounter` and `--butthurt` the output `dolphin.state` can be modified. The script will automaticly update the checksum for the file. The `--out` parameter must be set. +With the `--icounter` and `--butthurt` the output `dolphin.state` can be modified. The script will automaticly update the checksum for the file. The `--out` parameter must be set. #### Setting EXP -`python3 dolphin_state.py dolphin.state --icounter=1337 --out dolphin-new.state` + +`python3 dolphin-state.py dolphin.state --icounter=1337 --out dolphin-new.state` #### Setting the Mood (Butthurt) -`python3 dolphin_state.py dolphin.state --butthurt=14 --out dolphin-new.state` -#### Setting EXP and Mood -`python3 dolphin_state.py dolphin.state --icounter=1337 --butthurt=14 --out dolphin-new.state` +`python3 dolphin-state.py dolphin.state --butthurt=14 --out dolphin-new.state` + +#### Setting EXP and Mood + +`python3 dolphin-state.py dolphin.state --icounter=1337 --butthurt=14 --out dolphin-new.state` ## Output -```python +```python [+] Read 40 bytes from dolphin.state [+] Updating icounter to 1337 [+] Saving dolphin state to new-dolphin.state @@ -59,14 +64,13 @@ With the `--icounter` and `--butthurt` the output `dolphin.state` can be modifie level: 2 mood: Angry enough to leave percent complete: 69.13% -``` - +``` ### Help ```python -> python3 dolphin_state.py -h -usage: dolphin_state.py [-h] file +> python3 dolphin-state.py -h +usage: dolphin-state.py [-h] file Read the contents of a flipper-zero's dolphin.state @@ -75,17 +79,16 @@ positional arguments: optional arguments: -h, --help show this help message and exit -``` +``` #### Reading / Writing the dolphin.state -1. Use the file manager version of the qflipper software for PC. +1. Use the file manager version of the qflipper software for PC. 2. Open the `internal flash storage` 3. Drag and drop the `dolphin.state` file to read/write it to the flipper! - ## Credits -Thanks to the FlipperZero team for developing this awsome product! -- Lamp (Tarsad) : For the idea, and sharing his `dolphin.state` files. And explaining how one could read/write the `dolphin.state` file. +Thanks to the FlipperZero team for developing this awsome product! +- Lamp (Tarsad) : For the idea, and sharing his `dolphin.state` files. And explaining how one could read/write the `dolphin.state` file. diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d1befe1 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +colorama==0.4.6 +future==1.0.0 +hexdump==3.3 +iso8601==2.1.0 +PyYAML==6.0.1 +serial==0.0.97 +termcolor==2.4.0