Skip to content

Instantly share code, notes, and snippets.

@Wintus
Last active September 8, 2023 10:01
Show Gist options
  • Save Wintus/6b6ce72d914da732c220ebacd39d7ffb to your computer and use it in GitHub Desktop.
Save Wintus/6b6ce72d914da732c220ebacd39d7ffb to your computer and use it in GitHub Desktop.
一般社団法人サイバー技術・インターネット自由研究
[console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding;
$env:Path = "C:\Program Files\OpenSSL-Win64\bin;$env:Path";
openssl s_client -connect koukoku.shadan.open.ad.jp:992
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'net-telnet'
end
mode = ARGV[1]
modes = /(no)?(body|talk)/
fail unless mode.nil? || mode.match?(modes)
f = Net::Telnet::new(
"Host" => 'koukoku.shadan.open.ad.jp',
)
s = f.sock.tap { _1.set_encoding 'SJIS', 'UTF-8' }
s.puts mode
s.each { print _1.delete_prefix(' ') }
f.close
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment