You've been a bad boy? :P
Any idea why?
You've been a bad boy? :P
... Have you been talking to my wife??![]()
It's the cookies. The new version of Yabb has a different cookie format and the PET script is written using the old format. I will fix it in the next couple of days.
ah - blame it on the cookies! ;D
This turns out to be a tougher problem than I thought.
The yabbse code is written in PHP, the PET script in Perl.
The new yabbse version scrambles the username and password and send it to the user in a cookie. I found this line in the yabbse code that looks like the one that unscrambles the cookie:
The $_COOKIE[$cookiename] variable looks something like this:Code:list($username, $password) = @unserialize(stripslashes($_COOKIE[$cookiename]));
which is the value of the scrambled cookie.Code:a%3A2%3A%7Bi%3A0%3Bs%3A0%3A%2248%42%3Bi%3A1%3Bs%3A32%3A%22531f7423f0d1146bece3f7b5c1a10a36%22%3C%7D
Now both unserialize and stripslashes are built-in PHP functions. To get the PET script working again I need to get the $username variable somehow. The question is is there an equivalent function in Perl for both unserialize and stripslashes or can a little PHP script written to unscramble the cookie and pass the value of $username to the PET script?
PHP gurus please help me out ...
strip slashes should be as simple as s/\\([^\\])/$1/g
if you decoded the cookie thing with normal %XX == chr(0xXX) it comes out like
a:2:{i:0;s:2:"79";i:1;s:32:"ENCRYPT ED PASSWORD";}
i think 79 is my user id?
and the 79 isn't encoded so you could just do a /%22(.*?)%22.*?%22(.*?)%22/
then userid is in $1 and encrypted password in $2
assuming 79 is my id....
Thank you gorn, I was hoping you could help. I think I got it working. Could you guys check to see if it's working for you?
looked good here:
http://www.linuxjunior.org/cgi-bin/p...play&id=92
Bookmarks