collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: tip for bots on a linux box  (Read 9833 times)

0 Members and 1 Guest are viewing this topic.

Offline Sputnik

  • BeBot Rookie
  • *
  • Posts: 14
  • Karma: +0/-0
tip for bots on a linux box
« 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.

Offline Blondengy

  • BeBot Creator and Founder
  • BeBot Hero
  • ******
  • Posts: 51
  • Karma: +0/-0
tip for bots on a linux box
« Reply #1 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?

Offline Sputnik

  • BeBot Rookie
  • *
  • Posts: 14
  • Karma: +0/-0
tip for bots on a linux box
« Reply #2 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

Offline Sputnik

  • BeBot Rookie
  • *
  • Posts: 14
  • Karma: +0/-0
tip for bots on a linux box
« Reply #3 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.

Offline Blondengy

  • BeBot Creator and Founder
  • BeBot Hero
  • ******
  • Posts: 51
  • Karma: +0/-0
tip for bots on a linux box
« Reply #4 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)

Offline Sputnik

  • BeBot Rookie
  • *
  • Posts: 14
  • Karma: +0/-0
tip for bots on a linux box
« Reply #5 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

Offline Blondengy

  • BeBot Creator and Founder
  • BeBot Hero
  • ******
  • Posts: 51
  • Karma: +0/-0
tip for bots on a linux box
« Reply #6 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

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 440
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal