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

Autorun script on USB plug-in #5

Open
Kraussie opened this issue Feb 1, 2023 · 3 comments
Open

Autorun script on USB plug-in #5

Kraussie opened this issue Feb 1, 2023 · 3 comments
Assignees

Comments

@Kraussie
Copy link
Collaborator

Kraussie commented Feb 1, 2023

No description provided.

@Kraussie Kraussie self-assigned this Feb 1, 2023
@Kraussie Kraussie added this to the Presentation #1 milestone Feb 1, 2023
@Kraussie
Copy link
Collaborator Author

Kraussie commented Feb 2, 2023

Found a built-in Linux subsystem (called "Udev") that can be used to listen for events and trigger a script:

https://stackoverflow.com/questions/69889385/ubuntu-server-21-10-how-to-run-shell-script-when-plugging-usb-device

https://opensource.com/article/18/11/udev

@Kraussie
Copy link
Collaborator Author

Kraussie commented Feb 2, 2023

Important Cases to Consider when Triggering Script:

  1. Only one USB is plugged in
  2. two USBs are connected
  3. the USB used to copy files too is smaller than the untrusted USB
  4. one or both of USBs are unplugged/disconnected

@Kraussie
Copy link
Collaborator Author

Kraussie commented Feb 2, 2023

ACTION=="add", RUN+="[SCRIPT]

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

No branches or pull requests

1 participant