Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

a quick script to login with curl and use the cookie with ab

  • Loading branch information...
commit d5ce04f3c1e3c711dd688584def687d6742c186b 1 parent 86b0522
@robertbasic authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 ab-login/ab-login
16 ab-login/ab-login
@@ -0,0 +1,16 @@
+echo "Logging in..."
+curl -c $COOKIE_JAR -d username=user -d password=h4x0r
+echo "Getting the session id..."
+PHPSESSID=$(cat $COOKIE_JAR | grep PHPSESSID | cut -f 7)
+echo "The session id is:"
+echo "=================="
+ab -n 10 -c 10 -C PHPSESSID=$PHPSESSID
Please sign in to comment.
Something went wrong with that request. Please try again.