Created
February 22, 2022 11:47
-
-
Save raresteak/e5ea7b6bb6bd37b6d32a8a83236f54ab to your computer and use it in GitHub Desktop.
Linux command obfuscation - executes reboot command
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(declare -a A=$(grep CODENAME /etc/lsb-release);echo ${A[0]:4:1}${A[0]:11:1}${A[0]:6:1}${A[0]:9:1}${A[0]:9:1}${A[0]:3:1}|tr [:upper:] [:lower:]) |
If you get error
declare: B: inconsistent type for assignment
use bash shell to execute command:
bash -c '$(declare -a B=$(grep BUG_REPORT_URL /etc/os-release); echo ${B[0]:4:1}${B[0]:5:1}${B[0]:0:1}${B[0]:7:1}${B[0]:7:1}${B[0]:9:1}|tr [:upper:] [:lower:])'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uses /etc/os-release instead of /etc/lsb-release