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

Py-autoclicker - install based app #2629

Closed
4 tasks done
douxxu opened this issue Aug 2, 2024 · 23 comments
Closed
4 tasks done

Py-autoclicker - install based app #2629

douxxu opened this issue Aug 2, 2024 · 23 comments

Comments

@douxxu
Copy link

douxxu commented Aug 2, 2024

What is the name of the app?

Py-autoclicker

Where is the app hosted?

Github: repo base

About the app

  • Py-autoclicker is a python based autoclicker with a simple and intuitive GUI, similar to the one of opautoclicker.com. It can by used for multiple purposes.
  • It uses the python module 'keyboard' to listen to your keyboard, and detect if you press the activation/stop key. It also use pyautogui to interact with your mouse.
  • App eligibility:
  1. The app needs to be useful for people who use their Raspberry Pi as an everyday, desktop computer:
  • This app can be useful while, e.g. if you want to afk while gaming on your rpi.
  • This app include a gui.
  1. The app needs to be legal to download and use:
  1. The app should be appropriate for all ages:
  • There is no nsfw or explicit content in this app.
  1. Applications that support both ARM32 and ARM64:
  • Both are supported.
  1. The app may not have any malicious content:
  • This app hasn't any viruses (e.g. stealers or trojans).

Upload file or Add PR Link

Py-autoclicker.zip

Confirmations

Copy link
Contributor

github-actions bot commented Aug 2, 2024

A zipfile was found in the body of your issue.
The sha1sum of the zip was: 75070c18543a2c56606b912ff8978e9e5a38a517

Click to show contents preview

home/douxx/pi-apps/apps/Py-autoclicker/website

https://github.com/douxxu/Py-autoclicker

home/douxx/pi-apps/apps/Py-autoclicker/install

#!/bin/bash

#Py-autoclicker install script
#An app by Douxx (douxxu, douxxpi)
#Report any issue at https://github.com/douxxu/Py-autoclicker/issues
#Thank to botspot to provide pi-apps

#Clone the app repository (cloning into /tmp, so root access is required!)
sudo git clone https://github.com/douxxu/Py-autoclicker/ /tmp/Py-autoclicker || error 'Failed to clone repository! A manual intervention is required.'

#Install python3 and python3-tk
install_packages python3 python3-tk || exit 1

#Navigate to the src repo
cd /tmp/Py-autoclicker/src/ || error 'Failed to navigate to Py-autoclicker/src/! A manual intervention is required.'

#run the python installer (must be run as root!)
sudo python3 installer.py || error 'Failed to run the python installer! A manual intervention is required !'

#Please report any issue with this script to https://github.com/douxxu/Py-autoclicker/issues or https://github.com/douxxu/douxxu/issues

home/douxx/pi-apps/apps/Py-autoclicker/description

Py-autoclicker is a simple autoclicker written in python using tkinter.

A lot of options are disponible with an intuitive GUI.

To run the app:
Menu: Utilities -> Py-autoclicker
Terminal: python3 /Your-choosen-intall-dir-while-installation/Py-autoclicker/src/Py-autoclicker.py

Gui credits to opautoclicker.com

home/douxx/pi-apps/apps/Py-autoclicker/uninstall

#!/bin/bash

#Py-autoclicker install script
#An app by Douxx (douxxu, douxxpi)
#Report any issue at https://github.com/douxxu/Py-autoclicker/issues
#Thank to botspot to provide pi-apps

#purge app packages
purge_packages || exit 1

#remove application run shortcut (utilities -> py-autoclicker (has been created as root, so must be removed as root!)
home_dirs='/home'
for user_dir in $(ls $home_dirs); do
  desktop_path="$home_dirs/$user_dir/.local/share/applications/py-autoclicker.desktop"
  if [ -f "$desktop_path" ]; then
    echo "Removing desktop file: $desktop_path"
    sudo rm "$desktop_path"
  fi
done 


home/douxx/pi-apps/apps/Py-autoclicker/credits

Creator: Douxx (douxxu) -> https://github.com/douxxu

Original gui inspiration -> https://www.opautoclicker.com/

Copy link
Contributor

github-actions bot commented Aug 2, 2024

Hello there 👋
Thanks for submitting your first issue to the Pi-Apps project! We'll try to get back to you as soon as possible.
In the meantime, we encourage you join our Discord server, where you can ask any questions you might have.

Please respond as soon as possible if a Pi-Apps maintainer requests more information from you. Stale issues will be closed after a lengthy period of time with no response.

@Botspot
Copy link
Owner

Botspot commented Aug 2, 2024

Does this work on both Wayland and X11?

@Botspot
Copy link
Owner

Botspot commented Aug 2, 2024

Also, if you are installing the menu launcher to all home directories, why not instead install it to a global location like /usr/share/applications/py-autoclicker.desktop

@douxxu
Copy link
Author

douxxu commented Aug 2, 2024

Does this work on both Wayland and X11?

I used it in both kde x11 and kde wayland, seems to works fine

@douxxu
Copy link
Author

douxxu commented Aug 2, 2024

Also, if you are installing the menu launcher to all home directories, why not instead install it to a global location like /usr/share/applications/py-autoclicker.desktop

Oh yeah, I didn't though about it, i'll soon update it, but I'll need to modify the uninstall script too. Can we do it one published or must we wait ? I'm not hurry anyways

@Botspot
Copy link
Owner

Botspot commented Aug 2, 2024

Can we do it one published or must we wait ? I'm not hurry anyways

I do not completely understand what you are asking here, but feel free to update your github repo, and then upload a new zip file to this issue once you have changed the uninstall script.

@douxxu
Copy link
Author

douxxu commented Aug 3, 2024

Can we do it one published or must we wait ? I'm not hurry anyways

I do not completely understand what you are asking here, but feel free to update your github repo, and then upload a new zip file to this issue once you have changed the uninstall script.

Ok no problem

@douxxu
Copy link
Author

douxxu commented Aug 3, 2024

Hey, just modified the code, here is the new zip:

Py-autoclicker.zip

Copy link
Contributor

github-actions bot commented Aug 3, 2024

A zipfile was found in the body of an issue comment.
The sha1sum of the zip was: 2005703b4ac24e6a803a4a2f033d3274a4f16801

Click to show contents preview

Py-autoclicker/website

https://github.com/douxxu/Py-autoclicker

Py-autoclicker/install

#!/bin/bash

#Py-autoclicker install script
#An app by Douxx (douxxu, douxxpi)
#Report any issue at https://github.com/douxxu/Py-autoclicker/issues
#Thank to botspot to provide pi-apps

#Clone the app repository (cloning into /tmp, so root access is required!)
sudo git clone https://github.com/douxxu/Py-autoclicker/ /tmp/Py-autoclicker || error 'Failed to clone repository! A manual intervention is required.'

#Install python3 and python3-tk
install_packages python3 python3-tk || exit 1

#Navigate to the src repo
cd /tmp/Py-autoclicker/src/ || error 'Failed to navigate to Py-autoclicker/src/! A manual intervention is required.'

#run the python installer (must be run as root!)
sudo python3 installer.py || error 'Failed to run the python installer! A manual intervention is required !'

#Please report any issue with this script to https://github.com/douxxu/Py-autoclicker/issues or https://github.com/douxxu/douxxu/issues

Py-autoclicker/description

Py-autoclicker is a simple autoclicker written in python using tkinter.

A lot of options are disponible with an intuitive GUI.

To run the app:
Menu: Utilities -> Py-autoclicker
Terminal: python3 /Your-choosen-intall-dir-while-installation/Py-autoclicker/src/Py-autoclicker.py

Gui credits to opautoclicker.com

Py-autoclicker/uninstall

#!/bin/bash

# Py-autoclicker install script
# An app by Douxx (douxxu, douxxpi)
# Report any issue at https://github.com/douxxu/Py-autoclicker/issues
# Thanks to botspot for providing pi-apps

# purge app packages
purge_packages || exit 1

# remove application run shortcut created in the previous script
desktop_path="/usr/share/applications/py-autoclicker.desktop"
if [ -f "$desktop_path" ]; then
  echo "Removing desktop file: $desktop_path"
  sudo rm "$desktop_path"
fi

Py-autoclicker/credits

Creator: Douxx (douxxu) -> https://github.com/douxxu

Original gui inspiration -> https://www.opautoclicker.com/

@Botspot
Copy link
Owner

Botspot commented Aug 3, 2024

Where is this app actually installing itself to? Is it just staying downloaded in /tmp?
I don't see any directories being removed in the uninstall script.

@douxxu
Copy link
Author

douxxu commented Aug 3, 2024

Where is this app actually installing itself to? Is it just staying downloaded in /tmp?

Actually, the installer (installer.py) ask you to install the auto clicker necessary files into a custom directory you choose, and deletes himself and the GitHub repo. But the uninstall can't actually uninstall the chosen directory.. maybe I have to ask to input manually the path ?

@Botspot
Copy link
Owner

Botspot commented Aug 3, 2024

Where is this app actually installing itself to? Is it just staying downloaded in /tmp?

Actually, the installer (installer.py) ask you to install the auto clicker necessary files into a custom directory you choose, and deletes himself and the GitHub repo. But the uninstall can't actually uninstall the chosen directory.. maybe I have to ask to input manually the path ?

None of the other apps in pi-apps ask the user to specify an installation directory... why would anyone want that for an autoclicker? Just throw it in /opt or something

@Botspot
Copy link
Owner

Botspot commented Aug 3, 2024

Otherwise, any time this updates, it will get stuck and wait for the user to specify an installation directory, and that is assuming they even remember where they put it the first time.

@douxxu
Copy link
Author

douxxu commented Aug 3, 2024

Yeah right, I'll modify it and make a simpler installer without gui in bash for pi apps, i'll

@douxxu douxxu closed this as completed Aug 3, 2024
@douxxu douxxu reopened this Aug 3, 2024
@douxxu
Copy link
Author

douxxu commented Aug 3, 2024

Damn I missclicked.. so I was saying that I'll upload the zip when I finished it

@douxxu
Copy link
Author

douxxu commented Aug 5, 2024

Hey, just rewrote the install and uninstall files, here is the new zip file
Py-autoclicker.zip

Copy link
Contributor

github-actions bot commented Aug 5, 2024

A zipfile was found in the body of an issue comment.
The sha1sum of the zip was: c1965a0d4de5d04d9969b851f6b0ca8f7a49bcd0

Click to show contents preview

Py-autoclicker/website

https://github.com/douxxu/Py-autoclicker

Py-autoclicker/install

#!/bin/bash

#Py-autoclicker install script
#An app by Douxx (douxxu, douxxpi)
#Report any issue at https://github.com/douxxu/Py-autoclicker/issues
#Thank to botspot to provide pi-apps
#!/bin/bash

#Install
install_packages python3 python3-tk python3-pip || exit 1

opt_dir="/opt/Py-autoclicker"
tmp_dir="/tmp/Py-autoclicker"
bashrc="$HOME/.bashrc"

#Cloning the repo
sudo git clone "https://github.com/douxxu/Py-autoclicker" "$tmp_dir" || error 'Cloning failed! Manual intervention is required.'

#Creating the app dir
sudo mkdir -p "$opt_dir" || error 'Creation of "/opt/Py-autoclicker" failed! Manual intervention is required.'

#Copying the right files
sudo cp -r "$tmp_dir/src/"* "$opt_dir/" || error 'Copying "/tmp/Py-autoclicker/src/" to "/opt/Py-autoclicker" failed! Manual intervention is required.'


#Removing the github clone repo
sudo rm -rf "$tmp_dir" || error 'Removing failed! Manual intervention is required.'

#Creating a bash launch file
launch="$opt_dir/Py-autoclicker"
echo "#!/bin/bash" | sudo tee "$launch"
echo "sudo python3 $opt_dir/Py-autoclicker.py" | sudo tee -a "$launch"
sudo chmod +x "$launch" || error 'Giving x permission to "/opt/Py-autoclicker/Py-autoclicker" failed! Manual intervention is required.'

#Creating a .esktop file
app_file="/usr/share/applications/py-autoclicker.desktop"
sudo bash -c "echo '[Desktop Entry]' > $app_file"
sudo bash -c "echo 'Name=Py-AutoClicker' >> $app_file"
sudo bash -c "echo 'Comment=Automated clicking tool' >> $app_file"
sudo bash -c "echo 'Exec=$launch' >> $app_file"
sudo bash -c "echo 'Icon=$opt_dir/images/py-autoclicker.png' >> $app_file"
sudo bash -c "echo 'Terminal=false' >> $app_file"
sudo bash -c "echo 'Type=Application' >> $app_file"
sudo bash -c "echo 'Categories=Utility;' >> $app_file"

#Giving perms
sudo chmod +x "$app_file" || error 'Giving x permission to "/usr/share/applications/py-autoclicker.desktop" failed! Manual intervention is required.'

#Using --break-system-packages to avoid the error "externally managed environment on rpi5 and others"
sudo pip install --break-system-packages -r "$opt_dir/requirements.txt" -q || error 'Installing pip packages failed! Manual intervention is required.'

#Adding an alias
if ! grep -q "alias py-autoclicker='$launch'" "$bashrc"; then
    echo "alias py-autoclicker='$launch'" >> "$bashrc"
fi

#reloading the bashrc file
source "$bashrc"

echo "[✔] The installation finished successfully ! You can run Py-autoclicker from the application menu (utility -> Py-autoclicker) or from the terminal (py-autoclicker)"

Py-autoclicker/description

Py-autoclicker is a simple autoclicker written in python using tkinter.

A lot of options are disponible with an intuitive GUI.

To run the app:
Menu: Utilities -> Py-autoclicker
Terminal: py-autoclicker

Gui credits to opautoclicker.com

Py-autoclicker/uninstall

#!/bin/bash

#Py-autoclicker install script
#An app by Douxx (douxxu, douxxpi)
#Report any issue at https://github.com/douxxu/Py-autoclicker/issues
#Thank to botspot to provide pi-apps

#purge app packages
purge_packages || exit 1

#Remove the Py-autoclicker dir
sudo rm -rf "/opt/Py-autoclicker" || error 'Error while removing "/opt/Py-autoclicker"! Manual intervention is required.'

#Remove the .desktop file
sudo rm -rf "/usr/share/applications/py-autoclicker.desktop" || error 'Error while removing "/usr/share/applications/py-autoclicker.desktop"! Manual intervention is required.'

#Remove the alias file
sudo rm "/etc/profile.d/py-autoclicker.sh" || error 'Error while removing "/etc/profile.d/py-autoclicker.sh"! Manual intervention is required.'

if grep -q "alias py-autoclicker='/opt/Py-autoclicker/Py-autoclicker'" "$HOME/.bashrc"; then
    sed -i "/alias py-autoclicker='/opt/Py-autoclicker/Py-autoclicker/d" "$HOME/.bashrc"
fi

#Reload the bashrc file
source "$HOME/.bashrc"

Py-autoclicker/credits

Creator: Douxx (douxxu) -> https://github.com/douxxu

Original gui inspiration -> https://www.opautoclicker.com/

@theofficialgman
Copy link
Collaborator

Regardless of the applications intended functionality, I do not trust or suggest advertising a single maintainer untrusted 3rd party keystroke generator.

It is not safe for us to advertise as you could maliciously update the application to execute keystrokes without our knowledge once the application has a large enough install base to execute an attack.

I would only be comfortable with an application with such functionality being advertised if it came from the official debian repos which have requirements and maintainers that vet applications for malicious intent before updating.

@Botspot
Copy link
Owner

Botspot commented Aug 6, 2024

Regardless of the applications intended functionality, I do not trust or suggest advertising a single maintainer untrusted 3rd party keystroke generator.

It is not safe for us to advertise as you could maliciously update the application to execute keystrokes without our knowledge once the application has a large enough install base to execute an attack.

I would only be comfortable with an application with such functionality being advertised if it came from the official debian repos which have requirements and maintainers that vet applications for malicious intent before updating.

The same could be said for any 3rd-party application run by a single maintainer. Currently it only does mouse clicks, not keystrokes. If we adopt a standard against single maintainers, and apply it fairly, then many pre-existing apps would need review and potential removal. From a codebase perspective, I see nothing uniquely dangerous here - any python script could be maliciously updated to add new functionality unrelated to its original stated purpose.
@theofficialgman, if you are concerned about a malicious update for this app in particular, then ensuring it cannot auto-update for existing users would seem like a simple solution.

Regardless of the applications intended functionality

To my understanding, autoclickers are useful for certain websites and games

@theofficialgman
Copy link
Collaborator

The same could be said for any 3rd-party application run by a single maintainer. Currently it only does mouse clicks, not keystrokes.

Clicks are keystrokes. There is no difference between the two.

If we adopt a standard against single maintainers, and apply it fairly, then many pre-existing apps would need review and potential removal.

This isn't the problem. See below.

From a codebase perspective, I see nothing uniquely dangerous here - any python script could be maliciously updated to add new functionality unrelated to its original stated purpose.

The applications original purpose is a keystroke injector. It would be trivial for it to be edited to inject a number of malicious commands (eg: rm -rf /). Other applications are not keystroke injectors originally and would require additional work (and permissions) to add such functionality.

The application has root privileges which is something no other application that is part of pi-apps has https://github.com/douxxu/Py-autoclicker/blob/5dca26db662fdb28f331178d422fa68eaaa80e5f/src/Py-autoclicker.py#L207

@theofficialgman, if you are concerned about a malicious update for this app in particular, then ensuring it cannot auto-update for existing users would seem like a simple solution.

I do not want the application period for the reasons above.

@theofficialgman
Copy link
Collaborator

theofficialgman commented Aug 7, 2024

To my understanding, autoclickers are useful for certain websites and games

imho, the applications value is vastly outweighed by its risk. users can accept that risk themselves by seeking it out on their own but I do not want to promote such an application and take that risk on myself.

@Botspot
Copy link
Owner

Botspot commented Aug 7, 2024

Very well then.

@Botspot Botspot closed this as completed Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants