Botspot / pi-apps

Raspberry Pi App Store for Open Source Projects
GNU General Public License v3.0
1.98k stars 203 forks source link

Py-autoclicker - install based app #2629

Closed douxxu closed 2 months ago

douxxu commented 2 months ago

What is the name of the app?

Py-autoclicker

Where is the app hosted?

Github: repo base

About the app

Upload file or Add PR Link

Py-autoclicker.zip

Confirmations

github-actions[bot] commented 2 months ago

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` ```bash #!/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` ```bash #!/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/ ```
github-actions[bot] commented 2 months ago

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 commented 2 months ago

Does this work on both Wayland and X11?

Botspot commented 2 months ago

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 commented 2 months ago

Does this work on both Wayland and X11?

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

douxxu commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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

Py-autoclicker.zip

github-actions[bot] commented 2 months ago

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` ```bash #!/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` ```bash #!/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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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

douxxu commented 2 months ago

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

douxxu commented 2 months ago

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

github-actions[bot] commented 2 months ago

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` ```bash #!/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` ```bash #!/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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

Very well then.