BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => AO 0.6 support => Topic started by: VampyreD on April 07, 2009, 11:11:05 pm

Title: Running bot on FreeBSD 64
Post by: VampyreD 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
Title: Re: Running bot on FreeBSD 64
Post by: Alreadythere on April 08, 2009, 05:18:49 pm
Someone else had a similar problem, he had to apply the fix below (original source (http://odins-zorn.de/viewtopic.php?t=2080)):

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.
+?>
Title: Re: Running bot on FreeBSD 64
Post by: VampyreD on April 08, 2009, 08:48:33 pm
Someone else had a similar problem, he had to apply the fix below (original source (http://odins-zorn.de/viewtopic.php?t=2080)):

Awesome, thank you. That seemed to do the trick
SimplePortal 2.3.7 © 2008-2025, SimplePortal