ログ取ってるみたいだな…
sub checkConnection {
if ($conState == 0 && !($remote_socket && $remote_socket->connected())) {
print "Connecting to Patch Server...\n";
connection(\$remote_socket, $config{'Patch_host'},$config{'Patch_port'});
sendPatchServer(\$remote_socket);
sleep(1);
sendPatchServer2(\$remote_socket);
sleep(1);
sendPatchServer3(\$remote_socket);
sleep(5);
killConnection(\$remote_socket);
$conState = 1;
} elsif ($conState == 1 && !($remote_socket && $remote_socket->connected())) {
sub sendPatchServer {
my $r_socket = shift;
my $msg = "GET
http://wpatch.ragnarokonline.jp/patch/patch_allow.txt HTTP/1.1" . pack("C*", 0x0D, 0x0A) .
"User-Agent: Patch Client" . pack("C*", 0x0D, 0x0A) .
"Host: wpatch.ragnarokonline.jp" . pack("C*", 0x0D, 0x0A) .
"Pragma: no-cache" . pack("C*", 0x0D, 0x0A, 0x0D, 0x0A);
$$r_socket->send($msg) if $$r_socket && $$r_socket->connected();
}
sub sendPatchServer2 {
my $r_socket = shift;
my $msg = "GET
http://wpatch.ragnarokonline.jp/patch/notice_patch.txt HTTP/1.1" . pack("C*", 0x0D, 0x0A) .
"User-Agent: Patch Client" . pack("C*", 0x0D, 0x0A) .
"Host: wpatch.ragnarokonline.jp" . pack("C*", 0x0D, 0x0A) .
"Pragma: no-cache" . pack("C*", 0x0D, 0x0A, 0x0D, 0x0A);
$$r_socket->send($msg) if $$r_socket && $$r_socket->connected();
}
sub sendPatchServer3 {
my $r_socket = shift;
my $msg = "GET
http://wpatch.ragnarokonline.jp/patch/patch.txt HTTP/1.1" . pack("C*", 0x0D, 0x0A) .
"User-Agent: Patch Client" . pack("C*", 0x0D, 0x0A) .
"Host: wpatch.ragnarokonline.jp" . pack("C*", 0x0D, 0x0A) .
"Pragma: no-cache" . pack("C*", 0x0D, 0x0A, 0x0D, 0x0A);
$$r_socket->send($msg) if $$r_socket && $$r_socket->connected();
}
if (substr($msg,0,8) eq 'HTTP/1.1') {
$msg_size = length($msg);
} elsif (substr($msg,0,4) eq $accountID) {
$msg_size = 4;
} elsif ($switch eq "0066") {
$msg_size = 3;
} elsif ($switch eq "0069" && length($msg) >= unpack("S1", substr($msg, 2, 2))) {
print "Local server started ($config{'local_host'}:$config{'local_port'})\n";
$input_pid = input_client();
$conState = 0;
if (!$config{'username'}) {
>>640-644 分かるやつは入れておけ
一番初めのリクエストしか返事が無いみたいだけどな
まぁ、ログには残るだろう
他にも修正したほうがいいみたいだが…
知らんやつは公式HP逝け
忘れてた
config.txtに
Patch_host 61.215.212.2
Patch_port 80
追加