pyFlipper, is a Unoffical Flipper Zero cli wrapper written in Python.
Setup instructions
$ git clone https://github.com/wh00hw/pyFlipper.git
$ cd pyFlipper
$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
from pyflipper import PyFlipper
Local serial port
flipper = PyFlipper(com=”/dev/ttyACM0″)
OR
Remote serial2websocket server
flipper = PyFlipper(ws=”ws://192.168.1.5:1337″)
Info
info = flipper.power.info()
Poweroff
flipper.power.off()
Reboot
flipper.power.reboot()
Reboot in DFU mode
flipper.power.reboot2dfu()
Install update from .fuf file
flipper.update.install(fuf_file=”/ext/update.fuf”)
Backup Flipper to .tar file
flipper.update.backup(dest_tar_file=”/ext/backup.tar”)
Restore Flipper from backup .tar file
flipper.update.restore(bak_tar_file=”/ext/backup.tar”)
Get the storage filesystem info
ext_info = flipper.storage.info(fs=”/ext”)
Get the storage /ext dict
ext_list = flipper.storage.list(path=”/ext”)
Get the storage /ext tree dict
ext_tree = flipper.storage.tree(path=”/ext”)
Get file info
file_info = flipper.storage.stat(file=”/ext/foo/bar.txt”)
Make directory
flipper.storage.mkdir(new_dir=”/ext/foo”)
Read file
plain_text = flipper.storage.read(file=”/ext/foo/bar.txt”)
Remove file
flipper.storage.remove(file=”/ext/foo/bar.txt”)
Copy file
flipper.storage.copy(src=”/ext/foo/source.txt”, dest=”/ext/bar/destination.txt”)
Rename file
flipper.storage.rename(file=”/ext/foo/bar.txt”, new_file=”/ext/foo/rab.txt”)
MD5 Hash file
md5_hash = flipper.storage.md5(file=”/ext/foo/bar.txt”)
Write file in one chunk
file = “/ext/bar.txt”
text = “””There are many variations of passages of Lorem Ipsum available,
but the majority have suffered alteration in some form, by injected humour,
or randomised words which don’t look even slightly believable.
If you are going to use a passage of Lorem Ipsum,
you need to be sure there isn’t anything embarrassing hidden in the middle of text.
“””flipper.storage.write.file(file, text)
Write file using a listener
file = “/ext/foo.txt”
text_one = “””There are many variations of passages of Lorem Ipsum available,
but the majority have suffered alteration in some form, by injected humour,
or randomised words which don’t look even slightly believable.
If you are going to use a passage of Lorem Ipsum,
you need to be sure there isn’t anything embarrassing hidden in the middle of text.
“””
flipper.storage.write.start(file)
time.sleep(2)
flipper.storage.write.send(text_one)
text_two = “””All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as
necessary, making this the first true generator on the Internet.
It uses a dictionary of over 200 Latin words, combined with a handful of
model sentence structures, to generate Lorem Ipsum which looks reasonable.
The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words etc.
“””flipper.storage.write.send(text_two)
time.sleep(3)
Don’t forget to stop
flipper.storage.write.stop()
Kali Linux 2024.4, the final release of 2024, brings a wide range of updates and…
This Go program applies a lifetime patch to PowerShell to disable ETW (Event Tracing for…
GPOHunter is a comprehensive tool designed to analyze and identify security misconfigurations in Active Directory…
Across small-to-medium enterprises (SMEs) and managed service providers (MSPs), the top priority for cybersecurity leaders…
The free and open-source security platform SecHub, provides a central API to test software with…
Don't worry if there are any bugs in the tool, we will try to fix…