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

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

Author Topic: Running bot on FreeBSD 64  (Read 1968 times)

0 Members and 1 Guest are viewing this topic.

Offline VampyreD

  • BeBot Rookie
  • *
  • Posts: 2
  • Karma: +0/-0
Running bot on FreeBSD 64
« on: April 07, 2009, 11:11:05 pm »
I'm trying to get the bot running on with PHP 5.2.9 on FreeBSD 7.1 AMD64 edition. I can't seem to get my bot to authenticate itself. Has anyone been able to get this running on a a similar system (compiling PHP from source on a 64-bit system)?

I was able to get it running on Vista 64 and XP (but have php compiled as 32-bit application) but not on FreeBSD AMD64 compiled as a 64-bit application.

I think it's a bug that deals with a 64 bit os because when I look at the the server key, it doesn't look right to me

AOC Key (crypted): ffffffffffffffff7cdbe17cffffffffffffffffffffffffffffffff3f22a44c4070b521f0e0025203b7e972f4154d6d46d7c648ffffffff06706030ffffffff
Server key: ec53be4cf54c3a99a2430ab9d4a871ab56189aeb609bd0c8e3001c573599bc07ad6cf8b7af0b7f04c41d43272e3b40cf730c1f1714caf1d9fa9c137285cc2bcc8e9c5479836afa8662c0cf5cfecbdeee44992b96cd71207c1c586ba68d18990420772f814306957dc5ea5ad05f390a4eb40533fd1a2dd0cded9ad5807130bcef-ffffffffffffffff7cdbe17cffffffffffffffffffffffffffffffff3f22a44c4070b521f0e0025203b7e972f4154d6d46d7c648ffffffff06706030ffffffff

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Running bot on FreeBSD 64
« Reply #1 on: April 08, 2009, 05:18:49 pm »
Someone else had a similar problem, he had to apply the fix below (original source):

Quote
Hi,

i had problems with the aocchat.php on my 64bit rootserver.
i had to change the function SafeDecHexReverseEndian.

here the diff:
Code: [Select]
diff -Naur aocchat.php.org aocchat.php
--- aocchat.php.org     2008-06-30 10:50:50.000000000 +0200
+++ aocchat.php 2008-06-30 10:50:53.000000000 +0200
@@ -939,6 +939,7 @@
        function SafeDecHexReverseEndian($value)
        {
                $result = "";
+/*
                $hex   = dechex($this -> ReduceTo32Bit($value));
                $len   = strlen($hex);

@@ -956,7 +957,8 @@
                {
                        $bytes = str_split($hex, 2);
                }
-
+*/
+               $bytes = unpack("H*", pack("L*", $value));
                for($i = 3; $i >= 0; $i--)
                $result .= $bytes[$i];

@@ -1483,4 +1485,4 @@
                return $n;
        }
 }
-?>
\ Kein Zeilenumbruch am Dateiende.
+?>

Offline VampyreD

  • BeBot Rookie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Running bot on FreeBSD 64
« Reply #2 on: April 08, 2009, 08:48:33 pm »
Someone else had a similar problem, he had to apply the fix below (original source):

Awesome, thank you. That seemed to do the trick

 

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


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


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


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 543
  • 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