Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add requirements.txt for dependencies #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 23 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -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 <path-to-dolphin.state>`
### Reading

### Writing
`python3 dolphin-state.py <path-to-dolphin.state>`

### 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
Expand Down Expand Up @@ -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

Expand All @@ -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.
7 changes: 7 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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