bayserver 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/bayserver +20 -0
- data/conf/cgi_messages.bcf +6 -0
- data/conf/cgi_messages_ja.bcf +6 -0
- data/conf/dockers.bcf +22 -0
- data/conf/h2_messages.bcf +14 -0
- data/conf/h2_messages_ja.bcf +14 -0
- data/conf/httpstatus.bcf +41 -0
- data/conf/messages.bcf +90 -0
- data/conf/messages_ja.bcf +91 -0
- data/conf/mimes.bcf +65 -0
- data/init/cert/oreore.crt +21 -0
- data/init/cert/oreore.jks +0 -0
- data/init/cert/oreore.key +27 -0
- data/init/cert/oreore.p12 +0 -0
- data/init/plan/bayserver.plan +77 -0
- data/init/plan/groups.plan +20 -0
- data/init/www/cgi-demo/cgi-bin/test.bat +4 -0
- data/init/www/cgi-demo/cgi-bin/test.cgi +4 -0
- data/init/www/cgi-demo/index.html +19 -0
- data/init/www/cgi-demo/info.php +1 -0
- data/init/www/rack-demo/config.ru +3 -0
- data/init/www/rack-demo/file_upload.rb +95 -0
- data/init/www/rack-demo/form_params.rb +26 -0
- data/init/www/rack-demo/hijack_fully.rb +29 -0
- data/init/www/rack-demo/hijack_partially.rb +37 -0
- data/init/www/rack-demo/post_form_params.rb +31 -0
- data/init/www/rack-demo/print_env.rb +17 -0
- data/init/www/rack-demo/rack_demo.rb +51 -0
- data/init/www/rack-demo/rackenv +14 -0
- data/init/www/rack-demo/use_body_proxy.rb +28 -0
- data/init/www/root/bayserver-logo.png +0 -0
- data/init/www/root/favicon.ico +0 -0
- data/init/www/root/index.html +27 -0
- metadata +174 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5aadff40cf93b7bbc07725a53104490e40e2dd9b6cdb2e673f011ccd99a59195
|
4
|
+
data.tar.gz: d8961d73d89933be228880e9d025bdebae5777a0196affa7a6543b0d0e7702f5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 4ca0478bca4a644c173e310e61af40c6d8ea25b64878da7bab2c8c448cb8013ac025226f7cc760e519cffaa43d1d87e8dc29f1d453e24cf80c225537a5eab9ca
|
7
|
+
data.tar.gz: d130e79396a3c312b348ab1c9339807049f8fa5519b8884c73db66a6cdd8709b63170b65b2a5f5b09a78cc84fc73597f1821b4e5f6a734e93476bd780eeb4042
|
data/bin/bayserver
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require "pathname"
|
2
|
+
|
3
|
+
bserv_home = ENV["BSERV_HOME"]
|
4
|
+
if bserv_home == nil
|
5
|
+
bserv_home = "."
|
6
|
+
ENV["BSERV_HOME"] = bserv_home
|
7
|
+
end
|
8
|
+
|
9
|
+
bserv_lib = ENV["BSERV_LIB"]
|
10
|
+
if bserv_lib == nil
|
11
|
+
bserv_lib = File.dirname(File.dirname(File.expand_path(__FILE__)))
|
12
|
+
ENV["BSERV_LIB"] = bserv_lib
|
13
|
+
end
|
14
|
+
|
15
|
+
|
16
|
+
require 'baykit/bayserver/bayserver'
|
17
|
+
|
18
|
+
new_argv = ARGV.dup
|
19
|
+
new_argv.insert(0, __FILE__ )
|
20
|
+
Baykit::BayServer::BayServer.main new_argv
|
@@ -0,0 +1,6 @@
|
|
1
|
+
#
|
2
|
+
# CGI errors
|
3
|
+
#
|
4
|
+
|
5
|
+
CGI_PROC_READ_METHOD_SELECT_NOT_SUPPORTED Reading process output by select is not supported on this platform. We send files by taxi.
|
6
|
+
CGI_PROC_READ_METHOD_SPIN_NOT_SUPPORTED Reading process output by spin is not supported on this platform. We send files by taxi.
|
data/conf/dockers.bcf
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
harbor Baykit::BayServer::Docker::BuiltIn::BuiltInHarborDocker
|
2
|
+
port Baykit::BayServer::Docker::Http::HtpPortDocker
|
3
|
+
port:http Baykit::BayServer::Docker::Http::HtpPortDocker
|
4
|
+
port:ajp Baykit::BayServer::Docker::Ajp::AjpPortDocker
|
5
|
+
port:fcgi Baykit::BayServer::Docker::Fcgi::FcgPortDocker
|
6
|
+
city Baykit::BayServer::Docker::BuiltIn::BuiltInCityDocker
|
7
|
+
town Baykit::BayServer::Docker::BuiltIn::BuiltInTownDocker
|
8
|
+
club Baykit::BayServer::Docker::SendFile::SendFileDocker
|
9
|
+
club:file Baykit::BayServer::Docker::SendFile::SendFileDocker
|
10
|
+
club:servlet Baykit::BayServer::Docker::Servlet::ServletDocker
|
11
|
+
club:cgi Baykit::BayServer::Docker::Cgi::CgiDocker
|
12
|
+
club:phpCgi Baykit::BayServer::Docker::Cgi::PhpCgiDocker
|
13
|
+
club:ajpWarp Baykit::BayServer::Docker::Ajp::AjpWarpDocker
|
14
|
+
club:fcgiWarp Baykit::BayServer::Docker::Fcgi::FcgWarpDocker
|
15
|
+
club:httpWarp Baykit::BayServer::Docker::Http::HtpWarpDocker
|
16
|
+
club:terminal Baykit::BayServer::Docker::Terminal::TerminalDocker
|
17
|
+
log Baykit::BayServer::Docker::BuiltIn::BuiltInLogDocker
|
18
|
+
permission Baykit::BayServer::Docker::BuiltIn::BuiltInPermissionDocker
|
19
|
+
secure Baykit::BayServer::Docker::BuiltIn::BuiltInSecureDocker
|
20
|
+
trouble Baykit::BayServer::Docker::BuiltIn::BuiltInTroubleDocker
|
21
|
+
reroute:wordpress Baykit::BayServer::Docker::WordPress::WordPressDocker
|
22
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
0 The associated condition is not a result of an error.
|
2
|
+
1 The endpoint detected an unspecific protocol error.
|
3
|
+
2 The endpoint encountered an unexpected internal error.
|
4
|
+
3 The endpoint detected that its peer violated the flow-control protocol.
|
5
|
+
4 The endpoint sent a SETTINGS frame but did not receive a response in a timely manner.
|
6
|
+
5 The endpoint received a frame after a stream was half-closed.
|
7
|
+
6 The endpoint received a frame with an invalid size.
|
8
|
+
7 The endpoint refused the stream prior to performing any application processing.
|
9
|
+
8 Used by the endpoint to indicate that the stream is no longer needed.
|
10
|
+
9 The endpoint is unable to maintain the header compression context for the connection.
|
11
|
+
10 The connection established in response to a CONNECT request was reset or abnormally closed.
|
12
|
+
11 The endpoint detected that its peer is exhibiting a behavior that might be generating excessive load.
|
13
|
+
12 The underlying transport has properties that do not meet minimum security requirements.
|
14
|
+
13 The endpoint requires that HTTP/1.1 be used instead of HTTP/2.
|
@@ -0,0 +1,14 @@
|
|
1
|
+
0 関連する状態は、エラーの結果ではありません。
|
2
|
+
1 エンドポイントが不特定のエラーを検知しました。
|
3
|
+
2 エンドポイントで予期せぬ内部エラーが発生しました。
|
4
|
+
3 エンドポイントがピアのフロー制御プロトコル違反を検知しました。
|
5
|
+
4 エンドポイントが SETTINGS フレームを送信したものの、適切な時間内にそのレスポンスを受信しませんでした。
|
6
|
+
5 エンドポイントが half-closed のストリームからフレームを受信しました。
|
7
|
+
6 エンドポイントが不正なサイズのフレームを受信しました。
|
8
|
+
7 エンドポイントがアプリケーション処理をする前にストリームを拒否しました (8.1.4節)。
|
9
|
+
8 ストリームが必要がなくなったことを示すために、エンドポイントが使用します。
|
10
|
+
9 エンドポイントがコネクションのためのヘッダー圧縮コンテキストの維持に失敗しました。
|
11
|
+
10 CONNECT リクエストに応じて確立された接続が、リセットまたは不正終了しました。
|
12
|
+
11 ピアが過剰な負荷を発生させる可能性がある挙動をしたことをエンドポイントが検出しました。
|
13
|
+
12 下位のトランスポートの機能が最低限のセキュリティ要件を満たしていません。
|
14
|
+
13 エンドポイントは HTTP/2 の代わりに HTTP/1.1 の使用を要求しました。
|
data/conf/httpstatus.bcf
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
100 Continue
|
2
|
+
101 Switching Protocols
|
3
|
+
200 OK
|
4
|
+
201 Created
|
5
|
+
202 Accepted
|
6
|
+
203 Non Authoritative Information
|
7
|
+
204 No Content
|
8
|
+
205 Reset Content
|
9
|
+
206 Partial Content
|
10
|
+
207 Multi-Status
|
11
|
+
300 Multiple Choices
|
12
|
+
301 Moved Permanently
|
13
|
+
302 Moved Temporarily
|
14
|
+
303 See Other
|
15
|
+
304 Not Modified
|
16
|
+
305 Use Proxy
|
17
|
+
400 Bad Request
|
18
|
+
401 Unauthorized
|
19
|
+
402 Payment Required
|
20
|
+
403 Forbidden
|
21
|
+
404 Not Found
|
22
|
+
405 Method Not Allowed
|
23
|
+
406 Not Acceptable
|
24
|
+
407 Proxy Authentication Required
|
25
|
+
408 Request Timeout
|
26
|
+
409 Conflict
|
27
|
+
410 Gone
|
28
|
+
411 Length Required
|
29
|
+
412 Precondition Failed
|
30
|
+
413 Request Entity Too Large
|
31
|
+
414 Request Uri Too Long
|
32
|
+
415 Unsupported Media Type
|
33
|
+
422 Unprocessable Entity
|
34
|
+
423 Locked
|
35
|
+
500 Internal Server Error
|
36
|
+
501 Not Implemented
|
37
|
+
502 Bad Gateway
|
38
|
+
503 Service Unavailable
|
39
|
+
504 Gateway Timeout
|
40
|
+
505 Http Version Not Supported
|
41
|
+
507 Insufficient Storage
|
data/conf/messages.bcf
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
#
|
2
|
+
# Parser errors
|
3
|
+
#
|
4
|
+
PAS_BRACE_NOT_CLOSED Brace not closed
|
5
|
+
PAS_INVALID_INDENT Invalid indent
|
6
|
+
PAS_INVALID_LINE Invalid line
|
7
|
+
PAS_INVALID_WHITESPACE Invalid whitespace
|
8
|
+
|
9
|
+
#
|
10
|
+
# Configuration errors
|
11
|
+
#
|
12
|
+
CFG_INVALID_PARAMETER Invalid parameter: %s
|
13
|
+
CFG_INVALID_DOCKER_CLASS Invalid docker class: %s
|
14
|
+
CFG_INVALID_DESTINATION Invalid destination: %s
|
15
|
+
CFG_NO_PORT_DOCKER No port docker defined
|
16
|
+
CFG_INVALID_PORT_NAME Invalid port name: %s
|
17
|
+
CFG_LOCATION_NOT_FOUND Location not found: %s
|
18
|
+
CFG_LOCATION_NOT_DEFINED Location not defined
|
19
|
+
CFG_INVALID_LOCATION Invalid location: %s
|
20
|
+
CFG_INVALID_DOCKER Invalid docker: %s
|
21
|
+
CFG_DOCKER_NOT_FOUND Docker not found: %s
|
22
|
+
CFG_INVALID_LOG_FORMAT Invalid log format: %s
|
23
|
+
CFG_INVALID_PERMISSION_DESCRIPTION Invalid permission description: %s
|
24
|
+
CFG_GROUP_NOT_FOUND Group not found: %s
|
25
|
+
CFG_FILE_NOT_FOUND File not found: %s
|
26
|
+
CFG_WARP_DESTINATION_NOT_DEFINED Warp destination not defined
|
27
|
+
CFG_INVALID_WARP_DESTINATION Invalid warp destination: %s
|
28
|
+
CFG_INVALID_PARAMETER_VALUE Invalid value: %s
|
29
|
+
CFG_SSL_INIT_ERROR Initialize SSL error: %s
|
30
|
+
CFG_SSL_KEY_FILE_NOT_SPECIFIED Key file not specified
|
31
|
+
CFG_SSL_CERT_FILE_NOT_SPECIFIED Cert file not specified
|
32
|
+
CFG_INVALID_IP_DESC Invalid IP description: %s
|
33
|
+
CFG_IPV4_AND_IPV6_ARE_MIXED IPv4 and IPv6 are mixed: %s
|
34
|
+
CFG_PARAMETER_IS_NOT_A_NUMBER Parameter is not a number: %s value="%s"
|
35
|
+
CFG_MULTI_CORE_NOT_SUPPORTED Multi core mode is not supported on this platform. Start in single core mode.
|
36
|
+
CFG_SINGLE_CORE_NOT_SUPPORTED Single core mode is not supported on this platform. Start in multi core mode.
|
37
|
+
CFG_FILE_SEND_METHOD_SELECT_NOT_SUPPORTED Send file by select is not supported on this platform. We send files by taxi.
|
38
|
+
CFG_FILE_SEND_METHOD_SPIN_NOT_SUPPORTED Send file by spin is not supported on this platform. We send files by taxi.
|
39
|
+
CFG_LOG_WRITE_METHOD_SELECT_NOT_SUPPORTED Write log by select is not supported on this platform. We send files by taxi.
|
40
|
+
CFG_LOG_WRITE_METHOD_SPIN_NOT_SUPPORTED Write log by spin is not supported on this platform. We send files by taxi.
|
41
|
+
CFG_MAX_SHIPS_IS_TO_SMALL maxShips is too small. Set it at %d
|
42
|
+
CFG_TCP_NOT_SUPPORTED TCP not supported
|
43
|
+
CFG_UDP_NOT_SUPPORTED UDP not supported
|
44
|
+
CFG_CANNOT_SUPPORT_UNIX_DOMAIN_SOCKET This version of JVM does not support Unix domain socket.
|
45
|
+
|
46
|
+
|
47
|
+
#
|
48
|
+
# HTTP errors
|
49
|
+
#
|
50
|
+
HTP_SENDING_HTTP_ERROR Sending an HTTP error: conId=%s
|
51
|
+
HTP_CANNOT_SUPPORT_HTTP2 This version of JVM does not support HTTP2
|
52
|
+
HTP_INVALID_FIRST_LINE Invalid first line: %s
|
53
|
+
HTP_UNSUPPORTED_PROTOCOL Unsupported protocol: %s
|
54
|
+
HTP_INVALID_HEADER_FORMAT Invalid header format: %s
|
55
|
+
HTP_INVALID_PREFACE Invalid HTTP/2 preface
|
56
|
+
|
57
|
+
#
|
58
|
+
# Internal errors
|
59
|
+
#
|
60
|
+
INT_UNKNOWN_LOG_LEVEL Unknown log level: %s
|
61
|
+
INT_CANNOT_OPEN_LOG_FILE Cannot open log file: %s
|
62
|
+
INT_CANNOT_OPEN_PORT Cannot open port %s:%d: %s
|
63
|
+
INT_CANNOT_SET_SIG_HANDLER Cannot set signal handler: %s (sig=%s)
|
64
|
+
INT_NO_MORE_TOURS No more tours
|
65
|
+
|
66
|
+
|
67
|
+
#
|
68
|
+
# Network errors
|
69
|
+
#
|
70
|
+
NET_NOT_ALLOWED_TO_CONNECT_FROM Not allowed to connect from: %s
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
#
|
75
|
+
# Messages
|
76
|
+
#
|
77
|
+
MSG_OPENING_LOCAL_PORT Opening local port: %d
|
78
|
+
MSG_CLOSING_LOCAL_PORT Closing local port: %d
|
79
|
+
MSG_OPENING_TCP_PORT Opening TCP port: %s:%d [%s]
|
80
|
+
MSG_OPENING_UDP_PORT Opening UDP port: %s:%d [%s]
|
81
|
+
MSG_CLOSING_TCP_PORT Closing TCP port: %s:%d
|
82
|
+
MSG_CLOSING_UDP_PORT Closing UDP port: %s:%d
|
83
|
+
MSG_RUNNING_GRAND_AGENT Running grand agent: %s
|
84
|
+
MSG_OPEN_CTL_PORT Opening control port: %s
|
85
|
+
MSG_SETTING_UP_TOWN Setting up town: %s location: %s
|
86
|
+
MSG_COMMAND_RECEIVED Command received: %s
|
87
|
+
MSG_SENDING_COMMAND Sending command: cmd=%s
|
88
|
+
MSG_GRAND_AGENT_SHUTDOWN Grant agent shutdown: %d
|
89
|
+
|
90
|
+
|
@@ -0,0 +1,91 @@
|
|
1
|
+
#
|
2
|
+
# パースエラー
|
3
|
+
#
|
4
|
+
PAS_BRACE_NOT_CLOSED 中カッコが正しく閉じていません
|
5
|
+
PAS_INVALID_INDENT インデントが不正です
|
6
|
+
PAS_INVALID_LINE 不正な行です
|
7
|
+
PAS_INVALID_WHITESPACE 不正なホワイトスペースです
|
8
|
+
|
9
|
+
#
|
10
|
+
# 構成エラー
|
11
|
+
#
|
12
|
+
CFG_INVALID_PARAMETER パラメータが不正です: %s
|
13
|
+
CFG_INVALID_DOCKER_CLASS Dockerクラスが不正です: %s
|
14
|
+
CFG_INVALID_DESTINATION destinationが不正です: %s
|
15
|
+
CFG_NO_PORT_DOCKER Port dockerが定義されていません
|
16
|
+
CFG_INVALID_PORT_NAME Port名が不正です: %s
|
17
|
+
CFG_LOCATION_NOT_FOUND Locationが見つかりません: %s
|
18
|
+
CFG_LOCATION_NOT_DEFINED Locationが定義されていません
|
19
|
+
CFG_INVALID_LOCATION 不正なlocationです: %s
|
20
|
+
CFG_INVALID_DOCKER 不正なdockerです: %s
|
21
|
+
CFG_DOCKER_NOT_FOUND Dockerが見つかりません: %s
|
22
|
+
CFG_INVALID_LOG_FORMAT 不正なログフォーマットです: %s
|
23
|
+
CFG_INVALID_PERMISSION_DESCRIPTION 不正なパーミッション定義です: %s
|
24
|
+
CFG_GROUP_NOT_FOUND グループが見つかりません: %s
|
25
|
+
CFG_FILE_NOT_FOUND ファイルが見つかりません: %s
|
26
|
+
CFG_WARP_DESTINATION_NOT_DEFINED Warpのdestinationが定義されていません
|
27
|
+
CFG_INVALID_WARP_DESTINATION Warpのdestinationが不正です: %s
|
28
|
+
CFG_INVALID_PARAMETER_VALUE 不正な値です: %s
|
29
|
+
CFG_SSL_INIT_ERROR SSL初期化中のエラーです: %s
|
30
|
+
CFG_SSL_KEY_FILE_NOT_SPECIFIED Keyファイルが指定されていません
|
31
|
+
CFG_SSL_CERT_FILE_NOT_SPECIFIED Certファイルが指定されていません
|
32
|
+
CFG_INVALID_IP_DESC 不正なIP定義です: %s
|
33
|
+
CFG_IPV4_AND_IPV6_ARE_MIXED IPv4とIPv6が混在しています: %s
|
34
|
+
CFG_PARAMETER_IS_NOT_A_NUMBER Parameterは数値ではありません: %s value="%s"
|
35
|
+
CFG_MULTI_CORE_NOT_SUPPORTED このプラットフォームではマルチコアモードはサポートされません.シングルコアモードで起動します.
|
36
|
+
CFG_SINGLE_CORE_NOT_SUPPORTED このプラットフォームではシングルコアモードはサポートされません.マルチコアモードで起動します.
|
37
|
+
CFG_FILE_SEND_METHOD_SELECT_NOT_SUPPORTED このプラットフォームではselectでファイルを送信できません.タクシーで送信します.
|
38
|
+
CFG_FILE_SEND_METHOD_SPIN_NOT_SUPPORTED このプラットフォームではspinでファイルを送信できません.タクシーで送信します.
|
39
|
+
CFG_LOG_WRITE_METHOD_SELECT_NOT_SUPPORTED このプラットフォームではselectでログを書き込めません.タクシーで書き込みます.
|
40
|
+
CFG_LOG_WRITE_METHOD_SPIN_NOT_SUPPORTED このプラットフォームではspinでログを書き込めません.タクシーで書き込みます.
|
41
|
+
CFG_MAX_SHIPS_IS_TO_SMALL maxShipsが小さすぎます。次の値に設定します: %d
|
42
|
+
CFG_TCP_NOT_SUPPORTED TCPはサポートされません
|
43
|
+
CFG_UDP_NOT_SUPPORTED UDPはサポートされません
|
44
|
+
CFG_CANNOT_SUPPORT_UNIX_DOMAIN_SOCKET このバージョンのJVMはUnixメイン・ソケットをサポートしていません
|
45
|
+
|
46
|
+
|
47
|
+
#
|
48
|
+
# HTTPエラー
|
49
|
+
#
|
50
|
+
HTP_SENDING_HTTP_ERROR HTTPエラーを送信しています: conId=%s
|
51
|
+
HTP_CANNOT_SUPPORT_HTTP2 このバージョンのJVMはHTTP/2をサポートしていません
|
52
|
+
HTP_INVALID_FIRST_LINE 最初の行が不正です: %s
|
53
|
+
HTP_UNSUPPORTED_PROTOCOL サポートされないプロトコルです: %s
|
54
|
+
HTP_INVALID_HEADER_FORMAT ヘッダの形式が不正です: %s
|
55
|
+
HTP_INVALID_PREFACE HTTP/2プリフェースが不正です
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
#
|
60
|
+
# Internal
|
61
|
+
#
|
62
|
+
INT_UNKNOWN_LOG_LEVEL 未知のlog levalです: %s
|
63
|
+
INT_CANNOT_OPEN_LOG_FILE ログファイルをオープンできません: %s
|
64
|
+
INT_CANNOT_OPEN_PORT ポートを開けません %s:%d: %s
|
65
|
+
INT_CANNOT_SET_SIG_HANDLER シグナルハンドラを設定できません: %s (sig=%s)
|
66
|
+
INT_NO_MORE_TOURS No more tours
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
#
|
71
|
+
# Network errors
|
72
|
+
#
|
73
|
+
NET_NOT_ALLOWED_TO_CONNECT_FROM ここからの接続は許可されていません: %s
|
74
|
+
|
75
|
+
|
76
|
+
#
|
77
|
+
# Messages
|
78
|
+
#
|
79
|
+
MSG_OPENING_LOCAL_PORT ローカルポートを開いています: %d
|
80
|
+
MSG_CLOSING_LOCAL_PORT ローカルポートを閉じています: %d
|
81
|
+
MSG_OPENING_TCP_PORT TCPポートを開いています: %s:%d [%s]
|
82
|
+
MSG_OPENING_UDP_PORT UDPポートを開いています: %s:%d [%s]
|
83
|
+
MSG_CLOSING_TCP_PORT TCPポートを閉じています: %s:%d
|
84
|
+
MSG_CLOSING_UDP_PORT UDPポートを閉じています: %s:%d
|
85
|
+
MSG_RUNNING_GRAND_AGENT グランドエージェントを開始します: %s
|
86
|
+
MSG_OPEN_CTL_PORT 制御ポートを開いています: %s
|
87
|
+
MSG_SETTING_UP_TOWN 町を初期化しています: %s 場所: %s
|
88
|
+
MSG_SENDING_COMMAND コマンドを送信しています: %s
|
89
|
+
MSG_COMMAND_RECEIVED コマンドを受信しました: %s
|
90
|
+
MSG_GRAND_AGENT_SHUTDOWN グランドエージェントがシャットダウンしました: %d
|
91
|
+
|
data/conf/mimes.bcf
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
txt text/plain
|
2
|
+
html text/html
|
3
|
+
htm text/html
|
4
|
+
css text/css
|
5
|
+
gif image/gif
|
6
|
+
jpg image/jpeg
|
7
|
+
jpe image/jpeg
|
8
|
+
jpeg image/jpeg
|
9
|
+
png image/png
|
10
|
+
svg image/svg+xml
|
11
|
+
tiff image/tiff
|
12
|
+
tif image/tiff
|
13
|
+
bmp image/bmp
|
14
|
+
ico image/vnd.microsoft.icon
|
15
|
+
rtx text/richtext
|
16
|
+
tsv text/tab-separated-values
|
17
|
+
etx text/x-setext
|
18
|
+
ps application/x-postscript
|
19
|
+
eps application/postscript
|
20
|
+
tex application/x-tex
|
21
|
+
texinfo application/x-texinfo
|
22
|
+
texi application/x-texinfo
|
23
|
+
zip application/zip
|
24
|
+
gtar application/x-gtar
|
25
|
+
tar application/x-tar
|
26
|
+
dvi application/x-hdf
|
27
|
+
pdf application/pdf
|
28
|
+
rtf application/rtf
|
29
|
+
exe application/octet-stream
|
30
|
+
gz application/x-gzip
|
31
|
+
Z application/x-compress
|
32
|
+
z application/x-compress
|
33
|
+
mif application/x-mif
|
34
|
+
src application/x-wais-source
|
35
|
+
xls application/vnd.ms-excel
|
36
|
+
ppt application/vnd.ms-powerpoint
|
37
|
+
doc application/msword
|
38
|
+
js application/javascript
|
39
|
+
wav audio/x-wav
|
40
|
+
mid audio/midi
|
41
|
+
midi audio/midi
|
42
|
+
kar audio/midi
|
43
|
+
mpga audio/mpeg
|
44
|
+
mp2 audio/mpeg
|
45
|
+
mp3 audio/mpeg
|
46
|
+
au audio/basic
|
47
|
+
snd audio/basic
|
48
|
+
aif audio/x-aiff
|
49
|
+
aiff audio/x-aiff
|
50
|
+
aifc audio/x-aiff
|
51
|
+
mpeg video/mpeg
|
52
|
+
mpg video/mpeg
|
53
|
+
mpe video/mpeg
|
54
|
+
qt video/quicktime
|
55
|
+
mov video/quicktime
|
56
|
+
avi video/x-msvideo
|
57
|
+
movie video/x-sgi-movie
|
58
|
+
avx video/x-rad-screenplay
|
59
|
+
wrl x-world/x-vrml
|
60
|
+
mpv2 video/mpeg2
|
61
|
+
wmv video/x-ms-wmv
|
62
|
+
avi video/x-msvideo
|
63
|
+
3gp video/3gpp
|
64
|
+
3g2 video/3gpp2
|
65
|
+
woff font/woff
|
@@ -0,0 +1,21 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIIDbjCCAlYCCQDxdeQdd3G2gDANBgkqhkiG9w0BAQsFADB5MQswCQYDVQQGEwJP
|
3
|
+
UjEQMA4GA1UECAwHT3JlIE9yZTEMMAoGA1UEBwwDT3JlMQwwCgYDVQQKDANPcmUx
|
4
|
+
DDAKBgNVBAsMA09yZTEMMAoGA1UEAwwDT3JlMSAwHgYJKoZIhvcNAQkBFhFvcmVv
|
5
|
+
cmVAb3Jlb3JlLm9yZTAeFw0yMTA0MjgyMzUwMzBaFw0yMTA3MjcyMzUwMzBaMHkx
|
6
|
+
CzAJBgNVBAYTAk9SMRAwDgYDVQQIDAdPcmUgT3JlMQwwCgYDVQQHDANPcmUxDDAK
|
7
|
+
BgNVBAoMA09yZTEMMAoGA1UECwwDT3JlMQwwCgYDVQQDDANPcmUxIDAeBgkqhkiG
|
8
|
+
9w0BCQEWEW9yZW9yZUBvcmVvcmUub3JlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
|
9
|
+
MIIBCgKCAQEAvp/e8CUX5ijvw6lvSDX2E0jtR/b/8NCuWbb1cU2EKnG++ysCiYz+
|
10
|
+
OfbAaNesJT/XZXVS85Sub1D4Be5Blf89DLMuhKCmTQQhkbUGAtyU4HOM0jirTFVe
|
11
|
+
X9Hq66OENfPcqMvFWwEGWd1N30rUySd47zuLyNv98i6gQgUVTSrhvrOIMmqfdm0L
|
12
|
+
6z1ObhvJjglRBcMBpc2h9Suxwv7DwNKb6rSy+sFYsQ3w02wBn3Nx7qKKep+a9Ygz
|
13
|
+
DrW8T5pI72RDNC0xMLpaD2v/W1aFvCI5P5eGFz45pe3dsU9U4TinkcM5qOdW+Sd+
|
14
|
+
q4FNIKNzi3t9efzuHOW3FfmWljuQcn2STQIDAQABMA0GCSqGSIb3DQEBCwUAA4IB
|
15
|
+
AQAYEDW3EMyyxBLaqf8rbG85szYj5zsKKTsSrVVVfOUsOVwXtoJ2TPTUrKGSWL2A
|
16
|
+
olVwPojYt2JrtSFFRRXEiMUPdw9gK+i3FRs2y4rCH9kbsZBkE4WZ+iv/IKsckUby
|
17
|
+
uXZub8rGMWGVU8mKCDEt5f6Richb4Z1SfvOaJuwHO3ZAIJPiUO/Gzg9kvlhaCIXj
|
18
|
+
/ynz+Wl+9xRc0qfPTqF7VlYxiF3UVnu2QmHTWQbnQUh0lAwVBKWXGAE3hIC8Q3xJ
|
19
|
+
Wp3GcS9hFby89xZRhJJsvxzYDXyUDpdft1Lmj7fUh8iP3/gysDCNr3uH6825IWYl
|
20
|
+
6KXxpysjwD9dNlArE7MtKMrI
|
21
|
+
-----END CERTIFICATE-----
|
Binary file
|
@@ -0,0 +1,27 @@
|
|
1
|
+
-----BEGIN RSA PRIVATE KEY-----
|
2
|
+
MIIEowIBAAKCAQEAvp/e8CUX5ijvw6lvSDX2E0jtR/b/8NCuWbb1cU2EKnG++ysC
|
3
|
+
iYz+OfbAaNesJT/XZXVS85Sub1D4Be5Blf89DLMuhKCmTQQhkbUGAtyU4HOM0jir
|
4
|
+
TFVeX9Hq66OENfPcqMvFWwEGWd1N30rUySd47zuLyNv98i6gQgUVTSrhvrOIMmqf
|
5
|
+
dm0L6z1ObhvJjglRBcMBpc2h9Suxwv7DwNKb6rSy+sFYsQ3w02wBn3Nx7qKKep+a
|
6
|
+
9YgzDrW8T5pI72RDNC0xMLpaD2v/W1aFvCI5P5eGFz45pe3dsU9U4TinkcM5qOdW
|
7
|
+
+Sd+q4FNIKNzi3t9efzuHOW3FfmWljuQcn2STQIDAQABAoIBACR2gDZ/YersubA7
|
8
|
+
oMW3TLKzqG+zl5GA2Vjf3mMl6LoVt+pjd8DH73k28eccGhml9JW7s3pUXml8m3TG
|
9
|
+
9lSy1gKv454K/MSOnb05W0UA3JlygOVVYa7gRYUeqkkYphmL5BGFqOKXd5eI9XRY
|
10
|
+
5Ar2OfPI+BwbuJ+yu4TlZAW2xier6zozQvG/a61no3IOVJ2xiGhXh4uXo63PujFA
|
11
|
+
pkGjINTXw5a3k72ldTT5gxcVodwglbXyPARih835NFN4OQb3B+f5IiiiKUnamqVP
|
12
|
+
5dDiZceOS7PjgsnSoD4BbaD6s3JGlRZsRR0a4JwnwO53DgwewP2Ka2xubVn2AdTw
|
13
|
+
P8v8PAECgYEA5HO1dUuQvVcDZjjnUr4EzcftFFntRwfk14Vv9gnC7PcU5WHS2SB1
|
14
|
+
sbymDNHmB/toSfdPTu0F01k4XfZlhM556/6pG31aRZBBbCaYrE5JbwB0kKmZ7lzE
|
15
|
+
jqcvbARuhGf8hClDtzunwKpMaiCfcg83SnPiO4nExEX0nEmONkQ5wW0CgYEA1Zxu
|
16
|
+
Uhc1O4eUO6ew0L86dp+x/OqGWn0iv22Hyekv+utHvPb3wppfVek4JnSAUzSwVKMr
|
17
|
+
/Sdqb7V4GAEOm/TN7/rYVwMsvifY9jWrfPIr+O4veLuVx/28ygs771kbZ60/SeY1
|
18
|
+
HS4PjdSZax+L1kqBCCIiWzIMp33GqBCDwnzDaGECgYAC48fO1QberkQXve6HKGot
|
19
|
+
JDNGh6CtvlbRtxlkdlkl4DY+dI9TOcrjVayQCvOq9C4siVlSeUMSmlVRMvWzyVzX
|
20
|
+
dGA1Pc+vg5SgRpi1zUO2iL3wuoR89GV0HH9IEYJIYHxcO51kqveDQ2Q2D3WU3sZn
|
21
|
+
RbH96M85YF0owPFwlEpavQKBgQCsVYUnk3Ot8EbmDfb3op+/Hj2Rh4AXNwe2mt5H
|
22
|
+
RmsgK3t392ORy8uIWxyi4bC58DMmRXJyzb7wGt6ltwybQ9h1eNHa+UO6shk3IbuV
|
23
|
+
lSdmsHr6E5TWgV4zPvb+tcwHS91YeHJ3dTa1PUT9CLlfjEInVqqTGoDdC/sekhxK
|
24
|
+
5y8bYQKBgHnFPufvBRQguDPEAWL2fuA4GcLCvhkn1SroslSrJkoxrVBrPvTvkOno
|
25
|
+
XxpgbN673ym+b7YZ9+Q38LpC+OWIlyVNkEgwd1u1jq/2Cl/08PxGhKedBoPjrBLM
|
26
|
+
hUhoo2bBfN+UMNgaA7RgRkX4ZaBt7ZSD8y9nKRFguclebaYk3wFL
|
27
|
+
-----END RSA PRIVATE KEY-----
|
Binary file
|
@@ -0,0 +1,77 @@
|
|
1
|
+
[harbor]
|
2
|
+
charset UTF-8
|
3
|
+
groups plan/groups.plan
|
4
|
+
grandAgents 4
|
5
|
+
gzipComp on
|
6
|
+
|
7
|
+
|
8
|
+
#
|
9
|
+
# Port settings
|
10
|
+
#
|
11
|
+
[port 2020]
|
12
|
+
docker http
|
13
|
+
#[permission]
|
14
|
+
# admit ip 127.0.0.1/255.0.0.0
|
15
|
+
# admit ip ::1/::ffff:ffff
|
16
|
+
# refuse ip *
|
17
|
+
|
18
|
+
[port 2024]
|
19
|
+
[secure]
|
20
|
+
cert cert/oreore.crt
|
21
|
+
key cert/oreore.key
|
22
|
+
keyStorePass orepas
|
23
|
+
supportH2 on
|
24
|
+
|
25
|
+
[port 2025]
|
26
|
+
docker ajp
|
27
|
+
[permission]
|
28
|
+
admit ip 127.0.0.1/255.0.0.0
|
29
|
+
admit ip ::1/::ffff:ffff
|
30
|
+
refuse ip *
|
31
|
+
|
32
|
+
[port 2029]
|
33
|
+
docker fcgi
|
34
|
+
|
35
|
+
|
36
|
+
#
|
37
|
+
# Location settings
|
38
|
+
#
|
39
|
+
[city *]
|
40
|
+
[town /]
|
41
|
+
location www/root
|
42
|
+
welcome index.html
|
43
|
+
|
44
|
+
|
45
|
+
[town /cgi-demo/]
|
46
|
+
location www/cgi-demo
|
47
|
+
welcome index.html
|
48
|
+
[club *.cgi]
|
49
|
+
docker cgi
|
50
|
+
|
51
|
+
[club *.bat]
|
52
|
+
docker cgi
|
53
|
+
|
54
|
+
[club *.php]
|
55
|
+
docker phpCgi
|
56
|
+
|
57
|
+
[town /rack-demo]
|
58
|
+
[club *]
|
59
|
+
docker terminal
|
60
|
+
config www/rack-demo/config.ru
|
61
|
+
environment production
|
62
|
+
|
63
|
+
[log log/access.log]
|
64
|
+
format %a %l %u %t "%r" %>s %b
|
65
|
+
|
66
|
+
[log log/agent.log]
|
67
|
+
format %{User-Agent}i
|
68
|
+
|
69
|
+
[log log/referer.log]
|
70
|
+
format %{Referer}i -> %U
|
71
|
+
|
72
|
+
|
73
|
+
# [permission]
|
74
|
+
# admit ip 127.0.0.1/255.255.255.255
|
75
|
+
#refuse ip 127.0.0.0/255.0.0.0
|
76
|
+
|
77
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
[group]
|
2
|
+
admin admin
|
3
|
+
rocker guest evh
|
4
|
+
|
5
|
+
|
6
|
+
#
|
7
|
+
# You can generate encoded password by bayserver command
|
8
|
+
# $ bayserver -mkpass={password}
|
9
|
+
#
|
10
|
+
[member]
|
11
|
+
# password "guest"
|
12
|
+
guest 084e0343a0486ff05530df6c705c8bb4
|
13
|
+
|
14
|
+
# password "admin"
|
15
|
+
admin 21232f297a57a5a743894a0e4a801fc3
|
16
|
+
|
17
|
+
# password "evh"
|
18
|
+
evh 54adf6bbce21e5dcdc3851463712eab4
|
19
|
+
|
20
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<HTML>
|
2
|
+
<BODY BGCOLOR="#eeffee">
|
3
|
+
<H1>CGI Demo</H1>
|
4
|
+
|
5
|
+
<UL>
|
6
|
+
<LI>
|
7
|
+
<A HREF="cgi-bin/test.bat">test.bat</A>(Windows only)
|
8
|
+
</LI><P>
|
9
|
+
<LI>
|
10
|
+
<A HREF="cgi-bin/test.cgi">test.cgi</A>(Unix only)<br>
|
11
|
+
(Before run this CGI script, check the exec permission of it.)
|
12
|
+
</LI><P>
|
13
|
+
<LI>
|
14
|
+
<A HREF="info.php">info.php</A>(PHP needed)<br>
|
15
|
+
</LI><P>
|
16
|
+
</UL>
|
17
|
+
|
18
|
+
</BODY>
|
19
|
+
</HTML>
|
@@ -0,0 +1 @@
|
|
1
|
+
<?php phpinfo() ?>
|
@@ -0,0 +1,95 @@
|
|
1
|
+
|
2
|
+
class FileUpload
|
3
|
+
def call(env)
|
4
|
+
|
5
|
+
if env['REQUEST_METHOD'] == "GET"
|
6
|
+
# Print form when request method is 'GET'
|
7
|
+
cont = []
|
8
|
+
cont << "<html><body>"
|
9
|
+
cont << "<form method='post' enctype='multipart/form-data' >"
|
10
|
+
cont << "Message: <input type='text' name='message'/><br/>"
|
11
|
+
cont << "File: <input type='file' name='file'/><br/>"
|
12
|
+
cont << "<input type='submit' value='send'/><br/>"
|
13
|
+
cont << "</form>"
|
14
|
+
cont << "</body></html>"
|
15
|
+
|
16
|
+
else
|
17
|
+
cont_type = env['CONTENT_TYPE']
|
18
|
+
p = cont_type.index("boundary=")
|
19
|
+
boundary = "--" + cont_type[p + 9 .. nil]
|
20
|
+
|
21
|
+
io = env["rack.input"]
|
22
|
+
cont_len = env['CONTENT_LENGTH'].to_i
|
23
|
+
req_cont = nil
|
24
|
+
if cont_len > 0
|
25
|
+
req_cont = io.read(cont_len)
|
26
|
+
end
|
27
|
+
|
28
|
+
p "#{io}"
|
29
|
+
io.rewind()
|
30
|
+
|
31
|
+
parts = {}
|
32
|
+
items = req_cont.split(boundary)
|
33
|
+
items.each do |item|
|
34
|
+
item.strip!
|
35
|
+
io = StringIO.new(item)
|
36
|
+
part = {}
|
37
|
+
while true
|
38
|
+
begin
|
39
|
+
line = io.readline().strip()
|
40
|
+
rescue EOFError => e
|
41
|
+
break
|
42
|
+
end
|
43
|
+
|
44
|
+
if line == ""
|
45
|
+
break
|
46
|
+
end
|
47
|
+
p = line.index(":")
|
48
|
+
if p
|
49
|
+
name = line[0 .. (p-1)].strip()
|
50
|
+
value = line[p+1 .. nil].strip()
|
51
|
+
p "#{name}=#{value}"
|
52
|
+
if name.casecmp?("Content-Disposition")
|
53
|
+
value_items = value.split(";")
|
54
|
+
value_items.each do |value_item|
|
55
|
+
value_item.strip!
|
56
|
+
p = value_item.index("=")
|
57
|
+
if p
|
58
|
+
value_item_name = value_item[0 .. (p-1)]
|
59
|
+
value_item_value = value_item[p+2 .. -2]
|
60
|
+
p " #{value_item_name}=#{value_item_value}"
|
61
|
+
if value_item_name
|
62
|
+
part[value_item_name] = value_item_value
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
if part.keys.length > 0
|
71
|
+
part["body"] = io.read(item.length)
|
72
|
+
parts[part["name"]] = part
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
message = parts["message"]["body"]
|
77
|
+
file_name = File.expand_path(parts["file"]["filename"])
|
78
|
+
file_cont = parts["file"]["body"]
|
79
|
+
|
80
|
+
File.open(file_name, "wb") do |f|
|
81
|
+
f.write(file_cont)
|
82
|
+
end
|
83
|
+
|
84
|
+
env["rack.input"].rewind()
|
85
|
+
cont = []
|
86
|
+
cont << "<html><body>"
|
87
|
+
cont << "Uploaded<br>"
|
88
|
+
cont << "Mesasge:#{message}<br>"
|
89
|
+
cont << "FileName:#{file_name}<br>"
|
90
|
+
cont << "</body></html>"
|
91
|
+
|
92
|
+
end
|
93
|
+
[200, { "Content-Type" => "text/html" }, cont]
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class FormParams
|
2
|
+
def call(env)
|
3
|
+
qstr = env['QUERY_STRING']
|
4
|
+
cont = []
|
5
|
+
|
6
|
+
cont << "<html><body>"
|
7
|
+
|
8
|
+
if !qstr || qstr == ""
|
9
|
+
# request has no parameter
|
10
|
+
cont << "<form method='get'>"
|
11
|
+
cont << "First Name: <input type='text' name='fname'/><br/>"
|
12
|
+
cont << "Last Name: <input type='text' name='lname'/><br/>"
|
13
|
+
cont << "<input type='submit' value='send'/><br/>"
|
14
|
+
cont << "</form>"
|
15
|
+
|
16
|
+
else
|
17
|
+
# request has parameters
|
18
|
+
qstr.split('&').each do |param|
|
19
|
+
cont << "#{param}<br/>"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
cont << "</body></html>"
|
24
|
+
[200, { "Content-Type" => "text/html" }, cont]
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
class HijackFully
|
2
|
+
|
3
|
+
def call(env)
|
4
|
+
|
5
|
+
# Fully hijack the client socket.
|
6
|
+
env['rack.hijack'].call
|
7
|
+
io = env['rack.hijack_io']
|
8
|
+
begin
|
9
|
+
io.write("HTTP/1.1 200 OK\r\n")
|
10
|
+
io.write("Connection: close\r\n")
|
11
|
+
io.write("Content-Type: text/html\r\n")
|
12
|
+
io.write("\r\n")
|
13
|
+
io.write("<html><body>\n")
|
14
|
+
io.write("Fully Hijacked<br>\n")
|
15
|
+
5.times do |i|
|
16
|
+
print "Write data to hijacked io: #{io.inspect}\n"
|
17
|
+
io.write("Line #{i + 1}<br/>\n")
|
18
|
+
io.flush
|
19
|
+
sleep 1
|
20
|
+
end
|
21
|
+
io.write("</body></html>")
|
22
|
+
ensure
|
23
|
+
io.close
|
24
|
+
end
|
25
|
+
[200, [], []]
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
class HijackPartially
|
2
|
+
|
3
|
+
def call(env)
|
4
|
+
|
5
|
+
data = []
|
6
|
+
data << "<html><body>"
|
7
|
+
5.times do |i|
|
8
|
+
str = "Line #{i + 1}<br>\n"
|
9
|
+
data << str
|
10
|
+
end
|
11
|
+
data << "</body></html>"
|
12
|
+
|
13
|
+
len = data.inject(0) {|result, item| result + item.length}
|
14
|
+
|
15
|
+
|
16
|
+
response_headers = {}
|
17
|
+
response_headers["Content-Type"] = "text/html"
|
18
|
+
response_headers["Content-Length"] = len.to_s
|
19
|
+
response_headers["rack.hijack"] = lambda do |io|
|
20
|
+
# This lambda will be called after the app server has output
|
21
|
+
# headers. Here we can output body data at will.
|
22
|
+
begin
|
23
|
+
data.each do |text|
|
24
|
+
p "APP: write rails app data len=#{text.length}"
|
25
|
+
io.write(text)
|
26
|
+
io.flush
|
27
|
+
sleep 1
|
28
|
+
end
|
29
|
+
ensure
|
30
|
+
io.close
|
31
|
+
end
|
32
|
+
end
|
33
|
+
[200, response_headers, []]
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
class PostFormParams
|
2
|
+
def call(env)
|
3
|
+
|
4
|
+
cont_len = env['CONTENT_LENGTH'].to_i
|
5
|
+
qstr = nil
|
6
|
+
if cont_len > 0
|
7
|
+
qstr = env["rack.input"].read(cont_len)
|
8
|
+
end
|
9
|
+
cont = []
|
10
|
+
cont << "<html><body>"
|
11
|
+
|
12
|
+
if !qstr || qstr == ""
|
13
|
+
# request has no parameter
|
14
|
+
cont << "<form method='post'>"
|
15
|
+
cont << "First Name: <input type='text' name='fname'/><br/>"
|
16
|
+
cont << "Last Name: <input type='text' name='lname'/><br/>"
|
17
|
+
cont << "<input type='submit' value='send'/><br/>"
|
18
|
+
cont << "</form>"
|
19
|
+
|
20
|
+
else
|
21
|
+
# request has parameters
|
22
|
+
cont << "Posted parameters:<br/>"
|
23
|
+
qstr.split('&').each do |param|
|
24
|
+
cont << "#{param}<br/>"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
cont << "</body></html>"
|
29
|
+
[200, { "Content-Type" => "text/html" }, cont]
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class PrintEnv
|
2
|
+
|
3
|
+
def call(env)
|
4
|
+
|
5
|
+
cont = []
|
6
|
+
cont << "<html><body>"
|
7
|
+
cont << "<table border='1'>"
|
8
|
+
env.keys.each do |key|
|
9
|
+
cont << "<tr><td>#{key}</td><td>#{env[key]}</td></tr>"
|
10
|
+
end
|
11
|
+
cont << "</table>"
|
12
|
+
cont << "</body></html>"
|
13
|
+
[200, { "Content-Type" => "text/html" }, cont]
|
14
|
+
end
|
15
|
+
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require_relative './form_params'
|
2
|
+
require_relative './post_form_params'
|
3
|
+
require_relative './print_env'
|
4
|
+
require_relative './hijack_partially'
|
5
|
+
require_relative './hijack_fully'
|
6
|
+
require_relative './use_body_proxy'
|
7
|
+
require_relative './file_upload'
|
8
|
+
|
9
|
+
class RackDemo
|
10
|
+
|
11
|
+
|
12
|
+
ITEMS = {
|
13
|
+
"print_env" => [PrintEnv.new, "Print Environment"],
|
14
|
+
"form_params" => [FormParams.new, "Form Params(get)"],
|
15
|
+
"post_form_params" => [PostFormParams.new, "Form Params(post)"],
|
16
|
+
"hijack_patially" => [HijackPartially.new, "Partially Hijack"],
|
17
|
+
"hijack_fully" => [HijackFully.new, "Fully Hijack"],
|
18
|
+
"use_body_proxy" => [UseBodyProxy.new, "Use Body Proxy"],
|
19
|
+
"file_upload" => [FileUpload.new, "File Upload"],
|
20
|
+
}
|
21
|
+
|
22
|
+
def call(env)
|
23
|
+
print_env env
|
24
|
+
|
25
|
+
path = env["PATH_INFO"].split("/").last()
|
26
|
+
item = ITEMS[path]
|
27
|
+
if item
|
28
|
+
item[0].call env
|
29
|
+
else
|
30
|
+
menu env
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def menu(env)
|
35
|
+
|
36
|
+
cont = []
|
37
|
+
cont << "<html><body>"
|
38
|
+
cont << "Rack Demos<p>"
|
39
|
+
ITEMS.keys.each do |key|
|
40
|
+
cont << "<a href=#{key}>#{ITEMS[key][1]}</a><br>"
|
41
|
+
end
|
42
|
+
cont << "</body></html>"
|
43
|
+
[200, { "Content-Type" => "text/html" }, cont]
|
44
|
+
end
|
45
|
+
|
46
|
+
def print_env(env)
|
47
|
+
env.keys.each do |key|
|
48
|
+
p "#{key}=#{env[key]}"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
export BSERV_HOME=`realpath ../../`
|
2
|
+
|
3
|
+
export RUBYLIB=${BSERV_HOME}/lib/core
|
4
|
+
|
5
|
+
dockers=${BSERV_HOME}/lib/docker
|
6
|
+
|
7
|
+
if [ -e $dockers ]; then
|
8
|
+
for f in ${dockers}/*; do
|
9
|
+
export RUBYLIB=$RUBYLIB:${f}
|
10
|
+
done
|
11
|
+
fi
|
12
|
+
|
13
|
+
export BSERV_LOGLEVEL=debug
|
14
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'rack'
|
2
|
+
|
3
|
+
class MyBodyProxy < Rack::BodyProxy
|
4
|
+
|
5
|
+
|
6
|
+
def each(&block)
|
7
|
+
@body.each do |body|
|
8
|
+
yield body
|
9
|
+
sleep 1
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
class UseBodyProxy
|
15
|
+
def call(env)
|
16
|
+
|
17
|
+
data = []
|
18
|
+
data << "<html><body>"
|
19
|
+
5.times do |i|
|
20
|
+
str = "Line #{i + 1}<br>\n"
|
21
|
+
data << str
|
22
|
+
end
|
23
|
+
data << "</body></html>"
|
24
|
+
|
25
|
+
[200, { "Content-Type" => "text/html" }, MyBodyProxy.new(data)]
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
Binary file
|
Binary file
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<html><head><title>Welcome to BayServer</title >
|
2
|
+
<body bgcolor="#5599dd"><div align="right"></div>
|
3
|
+
|
4
|
+
<center>
|
5
|
+
<div align="center" style="background-color:white;width:500px;margin:50px" >
|
6
|
+
<img src="bayserver-logo.png">
|
7
|
+
<div align="left" style="padding:30px">
|
8
|
+
|
9
|
+
<ul>
|
10
|
+
<li>Documents
|
11
|
+
<ul>
|
12
|
+
<li><a href="https://baykit.yokohama/category/bayserver/">BayServer Documents(Baykit Site)</a></li>
|
13
|
+
</ul>
|
14
|
+
<li>Demos
|
15
|
+
<ul>
|
16
|
+
<li><a href="/cgi-demo/">CGI Demos</a></li>
|
17
|
+
<li><a href="/rack-demo/">Rack Demos (needs rack package)</a></li>
|
18
|
+
</ul>
|
19
|
+
</li>
|
20
|
+
</ul>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
</div>
|
24
|
+
</center>
|
25
|
+
|
26
|
+
</body>
|
27
|
+
</html>
|
metadata
ADDED
@@ -0,0 +1,174 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bayserver
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.2.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Michisuke-P
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-08-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bayserver-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.2.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.2.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bayserver-docker-ajp
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.2.0
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.2.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bayserver-docker-cgi
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.2.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.2.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bayserver-docker-fcgi
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.2.0
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.2.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bayserver-docker-http
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.2.0
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.2.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: bayserver-docker-terminal
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 2.2.0
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 2.2.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: bayserver-docker-wordpress
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 2.2.0
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 2.2.0
|
111
|
+
description: BayServer
|
112
|
+
email: michisukep@gmail.com
|
113
|
+
executables:
|
114
|
+
- bayserver
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- bin/bayserver
|
119
|
+
- conf/cgi_messages.bcf
|
120
|
+
- conf/cgi_messages_ja.bcf
|
121
|
+
- conf/dockers.bcf
|
122
|
+
- conf/h2_messages.bcf
|
123
|
+
- conf/h2_messages_ja.bcf
|
124
|
+
- conf/httpstatus.bcf
|
125
|
+
- conf/messages.bcf
|
126
|
+
- conf/messages_ja.bcf
|
127
|
+
- conf/mimes.bcf
|
128
|
+
- init/cert/oreore.crt
|
129
|
+
- init/cert/oreore.jks
|
130
|
+
- init/cert/oreore.key
|
131
|
+
- init/cert/oreore.p12
|
132
|
+
- init/plan/bayserver.plan
|
133
|
+
- init/plan/groups.plan
|
134
|
+
- init/www/cgi-demo/cgi-bin/test.bat
|
135
|
+
- init/www/cgi-demo/cgi-bin/test.cgi
|
136
|
+
- init/www/cgi-demo/index.html
|
137
|
+
- init/www/cgi-demo/info.php
|
138
|
+
- init/www/rack-demo/config.ru
|
139
|
+
- init/www/rack-demo/file_upload.rb
|
140
|
+
- init/www/rack-demo/form_params.rb
|
141
|
+
- init/www/rack-demo/hijack_fully.rb
|
142
|
+
- init/www/rack-demo/hijack_partially.rb
|
143
|
+
- init/www/rack-demo/post_form_params.rb
|
144
|
+
- init/www/rack-demo/print_env.rb
|
145
|
+
- init/www/rack-demo/rack_demo.rb
|
146
|
+
- init/www/rack-demo/rackenv
|
147
|
+
- init/www/rack-demo/use_body_proxy.rb
|
148
|
+
- init/www/root/bayserver-logo.png
|
149
|
+
- init/www/root/favicon.ico
|
150
|
+
- init/www/root/index.html
|
151
|
+
homepage: https://baykit.yokohama
|
152
|
+
licenses:
|
153
|
+
- MIT
|
154
|
+
metadata: {}
|
155
|
+
post_install_message:
|
156
|
+
rdoc_options: []
|
157
|
+
require_paths:
|
158
|
+
- lib
|
159
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - ">="
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '0'
|
164
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
|
+
requirements:
|
166
|
+
- - ">="
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '0'
|
169
|
+
requirements: []
|
170
|
+
rubygems_version: 3.1.6
|
171
|
+
signing_key:
|
172
|
+
specification_version: 4
|
173
|
+
summary: BayServer
|
174
|
+
test_files: []
|