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

Improve manual mode detection for RPi3-4 #366

Closed
wants to merge 1 commit into from

Conversation

ZerxXxes
Copy link

Description

RPi3 and 4 does not have a USB data-interface so they have no way of start in manual mode.
This change makes pwnagotchi start in manual mode if a link is detected on the eth0-interface or if the file .pwnagotchi-manual is placed in /root/ (similar to the .pwnagotchi-auto file)

Motivation and Context

Issue here: #365

  • I have raised an issue to propose this change (required)

How Has This Been Tested?

NO
I only have access to RPi3 at the moment, needs to be verified on a RPi0W and maybe a RPi4.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have signed-off my commits with git commit -s

@ZerxXxes
Copy link
Author

When writing this I realised, looks like we have a race condition here?
https://github.com/evilsocket/pwnagotchi/blob/master/builder/pwnagotchi.yml#L298-L338
both launchers look for .pwnagotchi-auto to force auto-mode, and both will delete it when found

so if bettercap-lancher starts first, it will delete .pwnagotchi-auto and pawnagotchi-launcher wont be forced to auto as the file might already be deleted
and vice versa

@gkrs
Copy link
Contributor

gkrs commented Oct 23, 2019

When writing this I realised, looks like we have a race condition here?
https://github.com/evilsocket/pwnagotchi/blob/master/builder/pwnagotchi.yml#L298-L338
both launchers look for .pwnagotchi-auto to force auto-mode, and both will delete it when found

so if bettercap-lancher starts first, it will delete .pwnagotchi-auto and pawnagotchi-launcher wont be forced to auto as the file might already be deleted
and vice versa

Actually the services should start in order. pwnagotchi.service has After=bettercap.service defined.
On the other hand, when bettercap deletes the file, pwnagotchi can't start in forced auto mode?

@evilsocket
Copy link
Owner

wait what? bettercap doesn't delete any file

@evilsocket
Copy link
Owner

oh the launcher

@evilsocket
Copy link
Owner

yeah just one of them should delete it, you're right, let me fix that

@evilsocket
Copy link
Owner

fixed with a78a4b0

@evilsocket evilsocket closed this Oct 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants