Last active
January 1, 2016 22:59
-
-
Save GOROman/8213433 to your computer and use it in GitHub Desktop.
スーパーハカー用プログラム
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# スーパーハカー用プログラム | |
require 'socket' | |
# 開くポート | |
PORT = 5656 # 適当なポート | |
# TCPサーバーになっちゃう | |
TCPServer.open( PORT ) do |server| | |
loop do | |
# クライアントからの接続を待つ | |
s = server.accept | |
# 内容を画面に出しちゃう | |
while line = s.gets | |
puts line | |
end | |
s.close | |
end | |
end | |
# これで Unity の WWWの url を "http://localhost:5656/" とかにすれば通信を傍受できます |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
これで Unity の WWWの url を "http://localhost:5656/" とかにすれば通信を傍受できます