[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
php hex code for cookie authentication to controller?
- To: or-talk@xxxxxxxxxxxxx
- Subject: php hex code for cookie authentication to controller?
- From: "Wesley Kenzie" <wkenzie@xxxxxxxxx>
- Date: Tue, 21 Oct 2008 11:52:33 -0700
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: or-talk-outgoing@xxxxxxxx
- Delivered-to: or-talk@xxxxxxxx
- Delivery-date: Tue, 21 Oct 2008 14:52:37 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=CPMgklfIpP46zaDs+jGHh/w/SZsAH+35WdYflZWEqNU=; b=LVgncuWWAyI8YSfAdOON66HQdAfptcH61Xs4UOMRDOhhH/CdZk48o/frTSlOouAz5p leV2P/5siN6OKitJCZurZMFXCCGnL8ET3s8Kst+WOCnYDj1dKJbR7L4sCb28Z23k8jJs TsClNmfSmyiGugUujUWGsrCokPN/mUVYjt+tI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=eThzWTULSXVaZejwtYSXwjUuETv2W3Gjlfrkt0G54hWzg6/y26/zg73ZYP3E3/Dj/G nNjVm07p0t9yk7NqVmOrTp8GF131RQ8EAXcec4lKNpnnVBqqYeGngvDFaNzaTAUX4rSO FDQfuN2s3VgwM6ndNDGQRV9JR8OYDsL/dYKwY=
- Reply-to: or-talk@xxxxxxxxxxxxx
- Sender: owner-or-talk@xxxxxxxxxxxxx
per 5.1 Authentication in control-spec.txt: "To authenticate, the controller must send the contents of this file, encoded in hexadecimal."
Fine, but when using the following in PHP:
$ch = fopen('cookiefilename', 'r');
$auth_value = fread($ch, 128);
$send_auth_value = "AUTHENTICATE \"". bin2hex($auth_value) . "\"\r\n";
$fh = fsockopen('127.0.0.1', controlportnumber);
fwrite($fh, $send_auth_value);
$buf = fgets($fh);
... I get 515 Authentication failed: Wrong length on authentication cookie.
Anyone help me with this? Thanks.
Wesley