Skip to content

Instantly share code, notes, and snippets.

@JustinAzoff
Created July 10, 2013 16:29
Show Gist options
  • Save JustinAzoff/5967817 to your computer and use it in GitHub Desktop.
Save JustinAzoff/5967817 to your computer and use it in GitHub Desktop.
Simple script that uses wget to download a usable copy of every RT ticket in HTML form. useful for disabling the web application but maintaining access to all ticket information in the standard format.
#!/bin/zsh
URL=$1
MAX=$2
echo -ne "User: "
read user
echo -ne "PW: "
read pw
wget --no-check-certificate --keep-session-cookies --save-cookies cookies.txt $URL/search/ticket?id=1 --post-data "user=$user&pass=$pw" -O/dev/null
wget --no-check-certificate --load-cookies cookies.txt --convert-links -p "$URL/Ticket/Display.html?id="{1..$MAX}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment