Skip to content

Instantly share code, notes, and snippets.

@FlamingTempura
Created March 14, 2015 17:59
Show Gist options
  • Select an option

  • Save FlamingTempura/3809f1ed6a2abc002df4 to your computer and use it in GitHub Desktop.

Select an option

Save FlamingTempura/3809f1ed6a2abc002df4 to your computer and use it in GitHub Desktop.
Archive a Simple Machines Forum (SMF) to html using wget
wget -m -np -a example.com_$(date +%Y%m%d).log -e robots=off -nv --adjust-extension --convert-links --page-requisites --reject-regex='(\?action=mlist|\?action=help|\?action=search|\?action=login|\?action=dlattach|\?action=reminder|\?action=register|\?action=credits|\?action=who|\?action=recent|\?action=celendar|\?action=stats|\?action=printpage|\?action=verificationcode|\.msg|sort[,=].+|prev_next[,=].+|wap2|action=\.xml|PHPSESSID)' http://example.com/
@aaferrari
Copy link

With the following command you can download a forum while logged in (for it to work you need to obtain a session cookie):
wget -x -m -np -a example.com_$(date +%Y%m%d).log -e robots=off -nv --adjust-extension --convert-links --page-requisites --reject-regex='(\?action=mlist|\?action=help|\?action=search|\?action=log(in|out)|\?action=reminder|\?action=register|\?action=credits|\?action=who|\?action=recent|\?action=celendar|\?action=stats|\?action=printpage|\?action=verificationcode|\?action=sendtopic|\?action=reporttm|\?action=notifyboard|\?action=post|\?action=notify|\?action=markasread|\?action=collapse|\.msg|sort[,=].+|prev_next[,=].+|wap2|action=\.xml|PHPSESSID)' http://www.example.com --load-cookies cookies.txt

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