BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => BeBot 0.2 support => Topic started by: Sputnik on February 04, 2005, 10:32:39 pm

Title: tip for bots on a linux box
Post by: Sputnik on February 04, 2005, 10:32:39 pm
ok heres what i got
start.php
Code: [Select]

$php_bin = "/usr/bin/php";
$main_php = "main.php";


and what im getting when i got to terminal and type php start.php
Aochat not expecting login

any ideas? pointers? or just plain tell me what im doing wrong. Im getting all the start up stuff like mod loads but it stops and repeats itself over and over after the Aochat not expecting login.
Title: tip for bots on a linux box
Post by: Blondengy on February 05, 2005, 01:37:05 am
Could you please post the all lines that show up?
How far on the login does it get? Where on the login procedure does the error show up?
Title: tip for bots on a linux box
Post by: Sputnik on February 05, 2005, 02:35:35 am
PHP Warning:  unpack(): Type H: outside of string in /home/daniel/bots/bebot/AOChat.php on line 715
[2005-02-05 01:36:51]   [LOGIN] [RESULT]        Error
[2005-02-05 01:36:51]   [LOGIN] [STATUS]        Logging in
AOChat: not expecting login.
Content-type: text/html
X-Powered-By: PHP/4.3.10
Title: tip for bots on a linux box
Post by: Sputnik on February 05, 2005, 06:32:42 am
I believe it has something to do with me php comp on my box. i did a phpinfo and looked at what extension were loaded and it did have bcmath enabled compress and sockets compiled into it.
Title: tip for bots on a linux box
Post by: Blondengy on February 05, 2005, 12:14:12 pm
Yes, I'm afraid this is a php 4.3.10 bug with the unpack("H" function. :(

Here's a little quote from Auno who made the AOChat module:

Quote from: "Auno"
Fedora Core 3 php includes a change backported from php5 that breaks aochat.  To work around it grab the php source rpm and delete patch 14.  I have been trying to figure out a good way to implement TEA with the double to long change, but haven't been able to come up with anything too elegant.  Anyone have ideas for this? :)

(other than the obvious write-it-in-c one)

// Auno

[See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=143514 for details.]
(Quote taken from http://www.hackersquest.org/boards/viewtopic.php?t=4884 page 3)

Quote from: "Auno"
Quote from: "jobo.no"

The bugreport was informative, but didn't help me out with the how. Can someone help me and potentially other n00bs with this? If not the command, then just a lhint with where to look.

You need to know your way around building RPMs for this... but I think the simplest way to solve this is to use the php-aokex PHP module instead of trying to make AOChat work.  So grab http://auno.org/dev/aochat/php-aokex-0.1.tar.gz, and then..
Code: [Select]

% tar zxf php-aokex-0.1.tar.gz
% cd php-aokex
% phpize
% ./configure
% make
% cp -p modules/aokex.so ..

Next edit your AOChat.php file and add dl("aokex.so"); somewhere in the beginning, then look for $this->generate_login_key(...) call and replace it with aokex_login_key(...);
Start your script with "php -d extension_dir=. start.php" and it should work if you did everything as described here ;)

Quote from: "jobo.no"
And also...
Quote from: "Auno"
I have been trying to figure out a good way to implement TEA with the double to long change, but haven't been able to come up with anything too elegant.  

...but will this solve work in spite of the Fedora Core 3 bug?

That is exactly what the above-mentioned module does, and it works at least on my systems. It implements the entire AO key exchange instead of just TEA though.

// Auno
(Quote taken from http://www.hackersquest.org/boards/viewtopic.php?t=4884 page 4)
Title: tip for bots on a linux box
Post by: Sputnik on February 06, 2005, 10:48:37 pm
ive been working on this aokex thing this weekend. And for somereason i cant get past the the configure part.  and gcc.gnu.org has been down to see if i can get anywhere with finding a solution to
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check

From what im gathering is theres a problem with my c++ compiler or i dont have it installed.  Which i dont understand how it couldnt be installed since i have gcc 3.4.3 loaded and should included c++ in it.  Well ill keep looking for solutions.

once i get past ./configure part im hoping the make make install part goes fine.

Thanks
Title: tip for bots on a linux box
Post by: Blondengy on February 07, 2005, 12:27:47 am
I must admit I haven't looked into aokex.
But if you need support for it I think the best place to find it is Auno's forums:
http://auno.org/forum.php
SimplePortal 2.3.7 © 2008-2024, SimplePortal