Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
TWCore Bot Login Failur

 
Post new topic   Reply to topic Printable version
 View previous topic  twcore/sending a message to a specific... Post :: Post TWCore "Released"  View next topic  
Author Message
z.alpha+
Novice


Joined: Oct 10 2006
Posts: 32
Offline

PostPosted: Wed Nov 15, 2006 8:05 pm    Post subject: TWCore Bot Login Failur Reply to topic Reply with quote

I'm currently working with a TWCore bot with ASSS with sgcompat enabled.

Whenver the bot tries to login i get the following error in the ASSS console:

Code: Show/Hide

[pid =1] bad login packet length (107)
[] [pid=1] disconnected


any idea on this?
Back to top
View users profile Send private message Add User to Ignore List
BDwinsAlt
Agurus's Posse


Age:33
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Wed Nov 15, 2006 8:40 pm    Post subject: Reply to topic Reply with quote

I tried to connect to as3 with twcore once, since you have to use continuum 0.39 to enter as3 I guess you have to mess with the packets.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
Bak
?ls -s
0 in


Age:25
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Thu Nov 16, 2006 3:28 am    Post subject: Reply to topic Reply with quote

can't sysops send a null encryption key which disables encryption?

The password / login packet from http://wiki.minegoboom.com/index.php/UDP_Game_Protocol
Code: Show/Hide
0x09   Game   0x40C0E7   Password/Login

-      0   1   Type
-      1   1   Boolean: New user (1 = New, 0 = Not New)
-      2   32   Name
-      34   32   Password
-      66   4   Machine ident (drive serial number - can be random for bots)
-      70   1   ConnectType (0x00 is a good idea)
-      71   2   Timezone bias
-      73   2   Unkown
-      75   2   Client version (0x24 = Ctm, 0x86 = SS)
-      77   4   Unkown, memory checksum, Set to = 444
-      81   4   Unkown, memory checksum, Set to = 555
-      85   4   Permission ident
-      89   12   Unkown


is of length 101, whereas twcore's implementation (from GamePacketGenerator.java)

Code: Show/Hide
public void sendPasswordPacket( String name, String password ){

        ByteArray      bytearray = new ByteArray( 107 );
        int[]          arr = { 0x86, 0x00, 0xBC, 0x01,
        0x00, 0x00, 0x2B, 0x02,
        0x00, 0x00 };

        bytearray.addByte( 0x09 );
        bytearray.addByte( 0x00 );
        bytearray.addPaddedString( name, 32 );       //Name
        bytearray.addPaddedString( password, 32 );   //Password

        bytearray.addByte( 0xd8 ); // Machine ID
        bytearray.addByte( 0x67 );
        bytearray.addByte( 0xeb );
        bytearray.addByte( 0x64 );

        bytearray.addByte( 0x04 ); // Machine ID
        bytearray.addByte( 0xE0 );
        bytearray.addByte( 0x01 );
        bytearray.addByte( 0x57 );
        bytearray.addByte( 0xFC );

        bytearray.addLittleEndianShort( (short)134 );
        bytearray.addLittleEndianInt( 444 );
        bytearray.addLittleEndianInt( 555 );
        bytearray.addLittleEndianInt( 0x92f88614 );
        bytearray.repeatAdd( 0x0, 12 );       //Last

        sendReliableMessage( bytearray );
    }


is sending a 107 length packet (even though it's only populating the first 101 bytes), which is of an incorrect length (and hence the error).

Change
Code: Show/Hide
ByteArray      bytearray = new ByteArray( 107 );
to
Code: Show/Hide
ByteArray      bytearray = new ByteArray( 101 );
and try again.
_________________
SubSpace Discretion: A Third Generation SubSpace Client
Back to top
View users profile Send private message Add User to Ignore List AIM Address
z.alpha+
Novice


Joined: Oct 10 2006
Posts: 32
Offline

PostPosted: Thu Nov 16, 2006 8:14 am    Post subject: Reply to topic Reply with quote

that removed the bad packet error.

however, whenever I try to log in now, twcore shows the bot trying to login as follows:

Code: Show/Hide

bot is logging in.
bot failed to log in. Login timed out.
bot is disconnecting...


and ass shows

Code: Show/Hide

<net> [pid=0] new connection from 192.168.1.1.:2041
<core> [pid=0] login request: 'bot'
<core> authentcating with 'auth-ban'
<capman> [bot] assigned to group 'sysop' (global)
<core> [bot] [pid=0] player logged in
<net>  [bot] [pid=0] disconnected


when i run the same bot against subgame2 with ssbilling2, it connects fine. are there any additional ass modules that i need load or unload? i have the bot assigned to the sysop group, and it does login to group 'sysop', but it's not connecting to the asss server.




icon_biggrin.gif
Back to top
View users profile Send private message Add User to Ignore List
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Thu Nov 16, 2006 1:59 pm    Post subject: Reply to topic Reply with quote

It's probably because the bot expects a packet (0x31) that only subgame sends when a biller is connected.

BTW what version of twcore do you have?
_________________
ss news
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
z.alpha+
Novice


Joined: Oct 10 2006
Posts: 32
Offline

PostPosted: Thu Nov 16, 2006 2:52 pm    Post subject: Reply to topic Reply with quote

0.89

is that the latest?


and does mean that as is, twcore will not work with ass?
Back to top
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:25
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Thu Nov 16, 2006 3:18 pm    Post subject: Reply to topic Reply with quote

give us a packet log and we'll find the problem. They're both open source so it shouldn't be too hard.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Cerium
Server Help Squatter


Age:41
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Thu Nov 16, 2006 6:29 pm    Post subject: Reply to topic Reply with quote

Actually, what Smong said is exactly right. For reasons unknown grel decided NOT to send 0x31, which TWCore waits for before attempting to enter an arena. As a result, the bot gets kicked after about 3-5 seconds.

Distort would be the best person to reply as to what class(es) need(s) to be modified to get the TWCore compatible with ASSS.


Alternatively, you can give Hybrid a try with the TWCore emulator. But I think you'd have less trouble modifying the actual TWCore than you would setting the emulator up.
_________________
There are 7 user(s) ignoring me right now.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
z.alpha+
Novice


Joined: Oct 10 2006
Posts: 32
Offline

PostPosted: Thu Nov 16, 2006 9:09 pm    Post subject: Reply to topic Reply with quote

which approach would be best modify asss, or modify twcore.

my initial thought is that it would be best to remove the twcore wait, since it's not required.

my next question is if i remove this from the twcore will it still work with subgame.

so much to do, so little time. icon_biggrin.gif

thanks for the help guys!!
Back to top
View users profile Send private message Add User to Ignore List
BDwinsAlt
Agurus's Posse


Age:33
Gender:Gender:Male
Joined: Jun 16 2003
Posts: 1145
Location: Alabama
Offline

PostPosted: Thu Nov 16, 2006 9:28 pm    Post subject: Reply to topic Reply with quote

I'm guessing if you remove the wait for it to recieve the packet and just allow it to go ahead and go in then it would work on subgame and asss. Just create a backup and see.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address Yahoo Messenger MSN Messenger
D1st0rt
Miss Directed Wannabe


Age:36
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Fri Nov 17, 2006 1:33 am    Post subject: Reply to topic Reply with quote

I actually fixed this back in April of '05, but naturally it hasn't been released. The good news is that a "release" of sorts will happen very soon biggrin.gif

Here's a quick fixed GPI I hacked together from a couple code diffs that should tide you over until then
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Bot Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 1228 page(s) served in previous 5 minutes.

phpBB Created this page in 1.348381 seconds : 35 queries executed (96.9%): GZIP compression disabled