Advertisement
thescreamingskull

guestsess

Dec 21st, 2014
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. @title guestsess
  2. @echo off
  3. :: NOTE: now requires ua.txt which contains a user agent string
  4. if not exist ua.txt (echo Please make a textfile named ua.txt that contains a User Agent string && goto :done)
  5. set /p useragent=<ua.txt
  6. :: guestsess.bat
  7. :: windows xp batch script
  8. :: fetches a 26-character guest sessionid from younow, saves it as sessionid.txt, loads it into the variable sessionid
  9. :: which can later be called in a batch file with %sessionid%
  10. ::
  11. :: requires wget, grep, sed (all from GnuWin32) all in PATH or same directory as batch file
  12. :: or temporarily in PATH with something like below if you uncomment it (remove the ::) and paste their install directory after the ; (without quotes)
  13. ::SET PATH=%PATH%;
  14. ::
  15. @wget -U "%useragent%" -T 10 http://www.younow.com/php/api/younow/user -O - | grep -o ".session.:.[a-z0-9]*." | sed -e "s/.session.:.//" -e "s/.$//" > sessionid.txt
  16. @set /p sessionid=<sessionid.txt
  17. :done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement