
Miesco
Member-
Posts
26 -
Joined
-
Last visited
Miesco's Achievements
Newbie (1/14)
-
I have not tried it with windows. I have not even used perll with windows but it probably will since perll is portable. You can try it and post any errors here. (s/perll/perl/ if I use the proper name in a message I get an error when I try to post)
-
Shawnbot, singled threaded subspace bot in perl, made on linux: http://shawnbot.sscentral.com/
-
For some reason now my bot is all of a sudden not receive kill packets... when someone dies it does not get the kill packet, is there any reason for this that you know of?
-
I have heard that ALL packets are encrypted after the 00 02 response. I am connecting to a normal server without encryption here: enc request sent: 0 1 26 -39 34 -17 1 0 Received: 00 05 58 98 84 0e Got core packet type: 05 server sync request: 0 5 88 152 132 14 sync response sent: 00 06 58 98 84 0e c8 44 40 00 Received: 00 02 e6 26 dd 10 00 17 cb 4f 1c 50 82 48 96 66 67 12 bd d4 c4 53 0c 4a 4f f4 9c 1f b4 da 23 17 41 8f d0 cd 10 59 6f cd 6a a5 3c f2 72 e5 d7 f3 bc 82 b0 c6 bd c7 5f c5 8c 0a 7f 6f a2 e0 5e ef cb fa 40 8e 0f 9a 11 67 48 ee 75 dd 8d fd c2 c0 68 f7 3c d5 a0 dc 07 4a d7 8c 5a 3d 48 d9 38 1f 37 f5 7f 67 f9 5f 7f 3e 21 b6 28 56 01 db b9 81 6b 3d 75 e6 10 53 06 89 32 76 55 ee 82 1f 5a a7 4f 0d 04 7d 47 dc 45 28 41 Got core packet type: 02 server enc response: 0 2 230 38 221 16 0 23 203 79 28 130 72 150 102 103 18 189 212 196 83 12 74 79 244 156 31 180 218 35 23 65 143 208 205 16 89 111 205 106 165 60 242 114 229 215 243 188 130 176 198 189 199 95 197 140 10 128 127 111 162 224 94 239 203 250 64 142 15 154 17 103 72 238 117 221 141 253 194 128 192 104 247 60 213 160 220 7 74 215 140 90 61 72 217 56 31 55 245 127 103 249 95 127 62 33 182 40 86 1 219 185 129 107 61 117 230 16 83 6 137 50 118 85 238 130 31 90 167 79 13 4 125 71 220 69 40 65 server key: 282928870 password sent: 09 00 73 68 61 77 6e 62 6f 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70 70 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 4c 00 00 00 f0 00 9d 6f 86 00 bc 01 00 00 2b 02 00 00 03 09 54 00 00 00 00 00 00 00 00 00 00 00 00 00 sync request sent: 00 05 e3 44 40 00 03 00 00 00 02 00 00 00 Received: 00 06 e3 44 40 00 9c 0f 10 33 Got core packet type: 06 server sync response: 0 6 227 68 64 0 156 15 16 51 Received: 00 07 Got core packet type: 07 disconnected As you can see from the 00 06 response, and the 00 07, the packets are not encrypted. I tried encrypting them after the 00 02, and I am decrypting NON-decrypted packets. Am I missing something packets being encrypted?
-
I think I already got the encryption this is what I got (in perl): sub initialize { my $seed = $_[0]; my ($tempSeed, $oldSeed); $tempSeed = $seed; for ($i = 0; $i < (520 / 2); $i++) { $oldSeed = $tempSeed; $tempSeed = (($oldSeed * 0x834E0B5F) >> 48) & 0xffffffff; $tempSeed = (($tempSeed + ($tempSeed >> 31)) & 0xffffffff); $tempSeed = (((($oldSeed % 0x1F31D) * 16807) - ($tempSeed * 2836) + 123) & 0xffffffff); if ($tempSeed > 0x7fffffff ) { $tempSeed = (($tempSeed + 0x7fffffff) & 0xffffffff); } $table[$i .. ($i+1)] = ence_short(short(tempSeed & 0xffff)); } } sub ssencrypt { my @packet = @_; my ($tempKey, $count, @output); $tempKey = $serverKey; #$count = scalar(@packet) + (4 - scalar(@packet) % 4); $count = scalar(@packet); @output = @packet; for ($i = 0; $i < $count; $i += 4) { $tempInt = dece_int(@output[$i .. ($i+3)]) ^ dece_int($table[$i]) ^ $tempKey; $tempKey = $tempInt; @output[$i .. ($i+3)] = ence_int(int($tempInt & 0xffffffff)); } return @output; } sub ssdecrypt { my @packet = @_; my ($tempKey, $count, @output); $tempKey = $serverKey; #$count = scalar(@packet) + (4 - scalar(@packet) % 4); $count = scalar(@packet); @output = @packet; for ($i = 0; $i < $count; $i += 4) { $tempInt = dece_int($table[$i]) ^ $tempKey ^ dece_int(@output[$i .. ($i+3)]); $tempKey = dece_int($i .. ($i+3)); @output[$i .. ($i+3)] = ence_int(int($tempInt & 0xffffffff)); } return @output; }
-
Yea I know for sure that it won't go open source, Mr. Ekted strongly believes in closed source, he won't do nothing
-
I think its a good idea to make the client modular so you can add modules, and then make it open source
-
Well I did know what the xor operator does, but I didn't know you can swap numbers like that. Anyways, im looking to see an explaination of the subspace encryption.
-
Could someone please explain the encryption, I know it uses the XOR operator but what does it do to each byte?
-
Are you sending in little-endian byte order? to check you could send the last short packet seperatly, as 01 00 so it would be like: packet.type=0x00; packet.subtype=0x01; packet.key=-(rand() % 0x7FFFFFFF); packet.version1=0x01; packet.version2=0x00;
-
Well I sent a sync response 00 06 (server timestamp integer) (my timestamp integer) I do not get a 00 02, or anything after I send that packet. I am sending the packet like I sent the 00 01 packet, no reliable/encrypted packets or anything. Could you tell me what I might be doing wrong? Here is a sync response packet I have sent: sync responst sent: 0 6 6 33 0 21 114 42 186 0, size: 10
-
ts: 262217, size: 6 ts: 235077706, size: 6 ts: 640876619, size: 6 ts: 76, size: 6 This is the timestamp I got in the 00 05 packet after sending the 00 01, ts is the timestamp, I ran the program 4 times in a row, now is the timestamp suppost to be random like this?
-
Use enc/dec of source by Snrrrub used LogicBot
Miesco replied to emileej's topic in General Discussion
Are you looking for the encyrption to and from 4 byte/2 byte little-endian integers/shorts? -
Use enc/dec of source by Snrrrub used LogicBot
Miesco replied to emileej's topic in General Discussion
Here take mine: sub encrypt { @data = @_; $encrypted = pack("C*", @data); return $encrypted; } sub decrypt { $data = $_[0]; $i = 0; foreach (unpack("C*", $data)) { $decrypted[$i] = sprintf("%x", $_); $i++; } return @decrypted; }