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

Interactive app.py #62

Open
wants to merge 4 commits 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
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
> The author of this project is not responsible for any possible harm caused by the materials of this project.

## Updates

**12/21/2023** <br>
<br>
It is no longer nescessary to re-run app.py with -d after viewing the options.
You can now just type the number of the option you want to use.
**9/21/23** <br>
<br>
Thanks to [0DayCTF](https://github.com/0dayctf) the random option has been added!<br>
Expand All @@ -18,6 +21,7 @@ Thanks to [0DayCTF](https://github.com/0dayctf) the random option has been added
```python3 app.py -r -i 20``` <br>
to set to it to random and the time interval to 20ms, making it more spammy.<br>
<br>

**9/13/2023** <br>
<br>
After [Techryptic's attempt to steal the work of myself and WillyJL](https://techcrunch.com/2023/09/05/flipper-zero-hacking-iphone-flood-popups/), Willy has taken the time to give an insanely in-depth timeline of the events and proof of the work being stolen (Git and my typos dont lie!) Check out the full report below and please help us spread the word that the person who has been all over the news outlets claiming this as their work, stole the code and gave none of the actual developers credit.<br>
Expand Down
16 changes: 10 additions & 6 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
from time import sleep
from utils.bluetooth_utils import toggle_device, start_le_advertising, stop_le_advertising



# Add a docstring to describe the purpose of the script
help_desc = '''

Expand Down Expand Up @@ -93,23 +95,25 @@ def main():
parser.add_argument('-i', '--interval', default=200, type=int, help='Advertising interval (default 200))')
parser.add_argument('-d', '--data', type=int, help='Select a message to send (e.g., -d 1)')

interactive = False
# Add random argument
parser.add_argument('-r', '--random', action='store_true', help='Randomly loop through advertising data')

args = parser.parse_args()

if args.data is None and not args.random:
print("Please select a message option using -d or use --random for random selection.")
print("Available message options:")
print("Please select a message option below:")
for option, description in bt_data_options.items():
print(f"{option}: {description}")
return
args.data = int(input())
interactive = True

if args.data and args.data not in bt_data_options:
print(f"Invalid data option: {args.data}")
print("Available data options:")
for option, description in bt_data_options.items():
print(f"{option}: {description}")
if interactive == False:
print("Available data options:")
for option, description in bt_data_options.items():
print(f"{option}: {description}")
return

# the default Bluetooth device is hci0
Expand Down