Cookie Consent by Free Privacy Policy Generator 📌 pyFlipper - Unoffical Flipper Zero Cli Wrapper Written In Python

🏠 Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeiträge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden Überblick über die wichtigsten Aspekte der IT-Sicherheit in einer sich ständig verändernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch übersetzen, erst Englisch auswählen dann wieder Deutsch!

Google Android Playstore Download Button für Team IT Security



📚 pyFlipper - Unoffical Flipper Zero Cli Wrapper Written In Python


💡 Newskategorie: IT Security Nachrichten
🔗 Quelle: kitploit.com


Unoffical Flipper Zero cli wrapper written in Python

Functions and characteristics:

  • Flipper serial CLI wrapper
  • Websocket client interface

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

Tested on:

  • Python 3.8.10 on Linux 5.4.0 x86_64
  • Python 3.10.5 on Android 12 (Termux + OTGSerial2WebSocket NO ROOT REQUIRED)

Usage/Examples

Connection

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")

Power

#Info
info = flipper.power.info()

#Poweroff
flipper.power.off()

#Reboot
flipper.power.reboot()

#Reboot in DFU mode
flipper.power.reboot2dfu()

Update/Backup

#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")

Loader

#List installed apps
apps = flipper.loader.list()

#Open app
flipper.loader.open(app_name="Clock")

Flipper Info

bluetooth info bt_info = flipper.bt.info()">
#Get flipper date
date = flipper.date.date()

#Get flipper timestamp
timestamp = flipper.date.timestamp()

#Get the processes dict list
ps = flipper.ps.list()

#Get device info dict
device_info = flipper.device_info.info()

#Get heap info dict
heap = flipper.free.info()

#Get free_blocks string
free_blocks = flipper.free.blocks()

#Get bluetooth info
bt_info = flipper.bt.info()

Storage

Filesystem Info

#Get the storage filesystem info
ext_info = flipper.storage.info(fs="/ext")

Explorer

#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")

Files

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()">
#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()

LED/Backlight

#Set generic led on (r,b,g,bl)
flipper.led.set(led='r', value=255)

#Set blue led off
flipper.led.blue(value=0)

#Set green led value
flipper.led.green(value=175)

#Set backlight on
flipper.led.backlight_on()

#Set backlight off
flipper.led.backlight_off()

#Turn off led
flipper.led.off()

Vibro

#Set vibro True or False
flipper.vibro.set(True)

#Set vibro on
flipper.vibro.on()

#Set vibro off
flipper.vibro.off()

GPIO

#Set gpio mode: 0 - input, 1 - output
flipper.gpio.mode(pin_name=PIN_NAME, value=1)

#Read gpio pin value
flipper.gpio.read(pin_name=PIN_NAME)

#Set gpio pin value
flipper.gpio.mode(pin_name=PIN_NAME, value=1)

MusicPlayer

#Play song in RTTTL format
rttl_song = "Littleroot Town - Pokemon:d=4,o=5,b=100:8c5,8f5,8g5,4a5,8p,8g5,8a5,8g5,8a5,8a#5,8p,4c6,8d6,8a5,8g5,8a5,8c#6,4d6,4e6,4d6,8a5,8g5,8f5,8e5,8f5,8a5,4d6,8d5,8e5,2f5,8c6,8a#5,8a#5,8a5,2f5,8d6,8a5,8a5,8g5,2f5,8p,8f5,8d5,8f5,8e5,4e5,8f5,8g5"

#Play in loop
flipper.music_player.play(rtttl_code=rttl_song)

#Stop loop
flipper.music_player.stop()

#Play for 20 seconds
flipper.music_player.play(rtttl_code=rttl_song, duration=20)

#Beep
flipper.music_player.beep()

#Beep for 5 seconds
flipper.music_player.beep(duration=5)

NFC

#Synchronous default timeout 5 seconds

#Detect NFC
nfc_detected = flipper.nfc.detect()

#Emulate NFC
flipper.nfc.emulate()

#Activate field
flipper.nfc.field()

RFID

#Synchronous default timeout 5 seconds

#Read RFID
rfid = flipper.rfid.read()

SubGhz

#Transmit hex_key N times(default count = 10)
flipper.subghz.tx(hex_key="DEADBEEF", frequency=433920000, count=5)

#Decode raw .sub file
decoded = flipper.subghz.decode_raw(sub_file="/ext/subghz/foo.sub")

Infrared

#Transmit hex_address and hex_command selecting a protocol
flipper.ir.tx(protocol="Samsung32", hex_address="C000FFEE", hex_command="DEADBEEF")

#Raw Transmit samples
flipper.ir.tx_raw(frequency=38000, duty_cycle=0.33, samples=[1337, 8888, 3000, 5555])

#Synchronous default timeout 5 seconds
#Receive tx
r = flipper.ir.rx(timeout=10)

IKEY

#Read (default timeout 5 seconds)
ikey = flipper.ikey.read()

#Write (default timeout 5 seconds)
ikey = flipper.ikey.write(key_type="Dallas", key_data="DEADBEEFCOOOFFEE")

#Emulate (default timeout 5 seconds)
flipper.ikey.emulate(key_type="Dallas", key_data="DEADBEEFCOOOFFEE")

Log

#Attach event logger (default timeout 10 seconds)
logs = flipper.log.attach()

Debug

#Activate debug mode
flipper.debug.on()

#Deactivate debug mode
flipper.debug.off()

Onewire

#Search
response = flipper.onewire.search()

I2C

#Get
response = flipper.i2c.get()

Input

#Input dump
dump = flipper.input.dump()

#Send input
flipper.input.send("up", "press")

Optimizations

Feel free to contribute in any way

  • Queue Thread orchestrator (check dev branch)
  • Implement all the cli functions
  • Async SubGhz Chat (check dev branch)

License

MIT

Buy me a pint

ZEC: zs13zdde4mu5rj5yjm2kt6al5yxz2qjjjgxau9zaxs6np9ldxj65cepfyw55qvfp9v8cvd725f7tz7

ETH: 0xef3cF1Eb85382EdEEE10A2df2b348866a35C6A54

BTC: 15umRZXBzgUacwLVgpLPoa2gv7MyoTrKat

Contacts

  • Discord: white_rabbit#4124
  • Twitter: @nic_whr
  • GPG: 0x94EDEADC


...



📌 A network wrapper written in Python.


📈 37.51 Punkte

📌 FreeBSD up to 5.2.1 Wrapper wrapper.c memory corruption


📈 34.48 Punkte

📌 shuffleDNS - Wrapper Around Massdns Written In Go That Allows You To Enumerate Valid Subdomains


📈 30.95 Punkte

📌 A wrapper for whatsapp which allows you to activate dark mode and make whatsapp full screen. Written in rust with gtk-rs.


📈 30.95 Punkte

📌 Returning the goodness community gave me : I made a simple and lightweight system cleaner CLI program written in Python.


📈 30.83 Punkte

📌 Musort - Organize your music library with a simple CLI tool written in Python


📈 30.83 Punkte

📌 Pyshark - Python Wrapper For Tshark, Allowing Python Packet Parsing Using Wireshark Dissectors


📈 30.38 Punkte

📌 [CLI] anime-downloader + trackma wrapper


📈 27.79 Punkte

📌 humungus — an hg server written in Go, supports `go get`, written by a core OpenBSD developer


📈 27.41 Punkte

📌 We know that Linux was written in C but on what platform was it written?


📈 27.41 Punkte

📌 [OC] Neofetch - A CLI system information tool written in BASH - Version 4.0.0 released.


📈 24.26 Punkte

📌 MPRISLyrics: a brand new CLI lyrics visualizer, written in PHP (I am not joking)


📈 24.26 Punkte

📌 Chrono CLI 1.0.0 Release - A timetracker written in Go


📈 24.26 Punkte

📌 ytp - CLI youtube searcher (written in bash)


📈 24.26 Punkte

📌 Tormix - a terminal user interface for the transmission-cli written in bash


📈 24.26 Punkte

📌 CLI based stock tracker / graph visualizer written in Go


📈 24.26 Punkte

📌 zauth: Simple 2FA (Two-Factor Authentication) CLI application with support to import/export andOTP files written in go.


📈 24.26 Punkte

📌 GitHub - fastfetch-cli/fastfetch: Like neofetch, but much faster because written in C.


📈 24.26 Punkte

📌 Radion, an internet radio CLI client, written in Bash.


📈 24.26 Punkte

📌 Linux/x86 Reverse Shell Shellcode / Python Wrapper


📈 23.81 Punkte

📌 Linux/x86 Reverse Shell Shellcode / Python Wrapper


📈 23.81 Punkte

📌 #0daytoday #Linux/x86 - Reverse Shell Shellcode (91 Bytes) + Python Wrapper [shellcode #0day #Exploit]


📈 23.81 Punkte

📌 [shellcode] Linux/x86 - Reverse Shell Shellcode (91 Bytes) + Python Wrapper


📈 23.81 Punkte

📌 Censys-Python - An Easy-To-Use And Lightweight API Wrapper For The Censys Search Engine


📈 23.81 Punkte

📌 Spyse.Py - Python API Wrapper And Command-Line Client For The Tools Hosted On Spyse.Com


📈 23.81 Punkte

📌 Introducing producthunt.py: A Python Wrapper for the Product Hunt API


📈 23.81 Punkte

📌 c't 3003: Hacking-Gerät Flipper Zero im Hands-on


📈 23.02 Punkte

📌 c't 3003: Hacking-Gerät Flipper Zero im Hands-on | heise online


📈 23.02 Punkte

📌 Hackingtool Flipper Zero: Der universelle Cyberdelfin


📈 23.02 Punkte

📌 Hackingtool Flipper Zero: Der universelle Cyberdelfin - Golem.de


📈 23.02 Punkte

📌 c't 3003: Kann das Hacking-Gerät Flipper Zero Autos knacken?


📈 23.02 Punkte

📌 c't 3003: Kann das Hacking-Gerät Flipper Zero Autos knacken? | heise online


📈 23.02 Punkte

📌 Einfach Autos aufmachen? | Hacking-Tool Flipper Zero im Test - YouTube


📈 23.02 Punkte











matomo