| 基本的に、0〜15 に +2 して、2〜17 文字の単語に置換する方法で、1Byteを2つの単語に置換する符号化方法だが、本家では記号もデリミタとしているが、StreamRelay.NET では記号は無視。 つまり、「semi-long」は本家では、4文字と4文字の二つの単語。StreamRelay.NETでは 8文字の一つの単語。 StreamRelay.NET では 2〜17文字以外の単語は無視(ノイズとして処理される) |
| オプション | 説明 |
|---|---|
| Base36[En|De]code32 | 32Bit を単位 |
| Base36[En|De]code64 | 64Bit を単位 |
| Base36[En|De]code[32|64]Custom=「[36|64]文字のシード」「文字コード」 | |
| オプション | 説明 |
|---|---|
| bBase36[En|De]code bGeohash36[En|De]code | 36進数 |
| bBase62[En|De]code | 62進数 |
| bBase65[En|De]code | 65進数 |
| bBase58[En|De]code[BitCoin|Flickr|Ripple] | 58進数 |
| bBase85[En|De]code[RFC1924|Z85|ZMODEM] | 85進数 |
| bBase91[En|De]code | 91進数 |
| bBase94[En|De]code | 94進数(0x21〜0x7e) |
| bBase95[En|De]code | 95進数(0x20〜0x7e) |
| bBaseNN[En|De]code=「[文字コード,]」「NN個の文字」 | |
| Ascii85 Wikipedia | |
|---|---|
| オプション | 説明 |
| Base85[En|De]codeRFC1924 | 上記 Wikipedia の RFC1924 の項に書かれているシード |
| Base85[En|De]codeZ85 | 上記 Wikipedia の ZeroMQ Version (Z85) の項に書かれているシード |
| Base85[En|De]codeZMODEM | 上記 Wikipedia の btoa version の項に書かれているシード |
| Base85[En|De]codeBTOA | 上記 Wikipedia の btoa version の項に書かれているシード 「z」による圧縮あり |
| Base85[En|De]codeBTOA42 | 上記 Wikipedia の btoa version の項に書かれているシード 「z」「y」による圧縮あり |
| Base85[En|De]codeAdobe | 上記 Wikipedia の btoa version の項に書かれているシード 「z」による圧縮あり。最終ブロックのパディングが特殊 |
| Base85[En|De]codeCustom=「85文字のシード」「文字コード」[,「85文字未満の圧縮文字(圧縮しない場合はスペースにする)」] | |
| TunnelType | |||
|---|---|---|---|
| ICMPorg | Ping | IPv4OpRRUdp | IPv4OpRRIcmp |
| ver3.3.1.0で実装したICMPのデータ部にそのまま埋め込むタイプ | IPv4レコードルート拡張に埋め込む。フォーマットは 「0x07」「サイズ(4の倍数)」「ポインタ=(サイズ)」「実際のサイズ」「データ+NULLパディング」「0x00」 当然IPv6には対応していない。上位プロトコル(フェイク)としてUDPとICMPを選択できる |
||
| RawSocketを使う事で、任意の ICMP が可能だが、UAC な管理権限が必要 | Ping は ICMP Echo Request 限定ではあるが Pingクラスを送信の簡易的なオブジェクトとして使う事でUACな管理権限を不要とした | 受信側はRawScoketを使うので UACな管理権限が必要 | |
| UdpClientを使うので、送信側には UACな管理権限は不要 | 送信側も RawSocketを使うので UACな管理権限が必要 | ||
| オプションの説明 | |
|---|---|
| Src=アドレス | 送信元となるIPアドレス。送信は指定可。受信で指定するとフィルタ対象 |
| Dist=アドレス | 送信先となるIPアドレス。送信は必須。受信で指定するとフィルタ対象、およびバインドする IP アドレス |
| Bind=アドレス | 受信時にバインドするIPアドレス |
| SrcPort=数 | 送信元のポート。フェイクが UDP の場合の送信は指定可。受信で指定するとフィルタ対象 |
| DistPort=数 | 送信先のポート。フェイクが UDP の場合の送信は必須。受信で指定するとフィルタ対象 |
| Type=数 | ICMP のタイプ。Ping以外のICMPを使った送信の場合は必須。受信で指定するとフィルタ対象 |
| Code=数 | ICMP のコード。Ping以外のICMPを使った送信の場合は必須。受信で指定するとフィルタ対象 |
| IcmpId=数 | ICMP の識別子。Ping以外のICMPを使った送信の場合のICMヘッダが8バイトの時、5-6バイト目を指定できる。受信で指定するとフィルタ対象 |
| IcmpSeq=[数|最小値-最大値%2cアルゴリズム名 | ICMP の識別子。Ping以外のICMPを使った送信の場合のICMヘッダが8バイトの時、7-8バイト目を範囲指定でアルゴリズム名によるランダム 使えるアルゴリズムはランダムのプラグイン |
| headersize=[4|8] | ICMPヘッダサイズを4バイトするか8バイトとするか。既定は8。Ping以外のICMPを使った送受信の場合に有効 |
| TTL=数 TTL=最小値-最大値 TTL=最小値-最大値%2cアルゴリズム名 |
IPv4/IPv6 の TTLの設定をする 受信の場合は、範囲指定のフィルタ対象 送信の場合は、範囲指定でアルゴリズム名によるランダム 使えるアルゴリズムはランダムのプラグイン |
| TOS=hex-hex | IPv4のTOSを設定/フィルタ対象とする 最初の16進数で指定するビットを指定。最後の16進数で指定するビットを指定。 例えば、下位 3-5ビット(00011100=0x1c)を対象として、値を「011⇒00001100=0x0c⇒つまり、xxx011xx (xは既定ビット)」としたい場合は、TOS=1c-0cとする 送信時はパケットに設定。受信時はフィルタ対象。 実際にパケットにセットできないようだ(Windows10)。Pingでは指定できない |
| DF=[true|false] | IPv4のDontFragmentビットの設定。 送信時はパケットに設定。受信時はフィルタ対象 |
| DataSize=数 | TunnelType=ICMPorgのICMPデータサイズの指定。一つのIPパケットに収まるサイズにした方がいいよ |
| FakeDataFile=ファイル FakeData=URLエンコードされた文字列 FakeDataHex=16進数な文字列 |
TunnelType=IPv4OpRRUdpまたはIPv4OpRRIcmpのフェイクデータ。ICMPの場合はICMPヘッダ+データ。UDPの場合はUDPデータを示す |
| Interval=数(ms) | 送信時にパケットの順番が崩れないように少し間を開ける。その時間。既定はStreamRelay.NET.exe本体のスレッドのインターバルタイム |
| LSR=CSVなIPv4アドレス SSR=CSVなIPv4アドレス |
IPv4 拡張のソースルーティングを指定する事ができる。TunnelType=IPv4OpRRUdpまたはIPv4OpRRIcmpには指定できない |
![]() |
| 基本的には二つの "ストリーム" のデータ交換を行う つまり、「ネットワーク|コンソール|外部コマンド|シリアルポート|名前付きパイプ」⇔「ネットワーク|コンソール|外部コマンド|シリアルポート|名前付きパイプ」で通信する |
![]() |
| 基本的には二つのストリームは対等だけど、 ネットワークストリームに関して、「サーバ」と「クライアント」と対等ではなくなるので、 片方(サーバとして動作する側)を「Local」。 もう片方(クライアントとして動作する側)を「Remote」と呼称している |
| オプション指定は、 片方のストーム(ネットワークでサーバとなる方)を「LocalXXXX」、もう片方(ネットワークでクライアントとなる方)を「RemoteXXXX」 「クライアント」→「サーバ」への流れに対して「RequestXXXX」 「サーバ」→「クライアント」への流れに対して「ResponseXXXX」 (とりあえず命名されているStream の)"Local" の入力側ということで「-LocalInoutXXXX」というオプション指定が可能なものもある。 (とりあえず命名されているStream の)"Local" の出力側ということで「-LocalOuoutXXXX」というオプション指定が可能なものもある。 (とりあえず命名されているStream の)"Remote" の入力側ということで「-RemoteInoutXXXX」というオプション指定が可能なものもある。 (とりあえず命名されているStream の)"Remote" の出力側ということで「-RemoteOuoutXXXX」というオプション指定が可能なものもある。 |
![]() |
| フィルタ機能として、Base64エンコード/デコードや、文字コード変換や、SOCKS Proxy 機能、ハッシュ計算、暗号化処理などを用意 |
![]() |
![]() |
| mailauth スキーム |
| :// |
| username ユーザ名 |
| : |
| password パスワード |
| @ ホスト名を無指定にする場合でも必須 |
| ホスト名 POP3/APOP before SMTP の場合の POPサーバ SMTP認証の場合は EHLO の引数でこの値がある時のみ EHLOコマンドを送る SMTPAUTOの場合は必須。無指定の場合はmail.example.comとなる |
| : |
| ポート番号(110) POP3/APOP before SMTP の場合の POPサーバのポート番号 |
| / |
| Type 認証タイプ PLAIN LOGIN CRAM-MD5 DIGEST-MD5 POP3BS APOPBS POP3 APOP SMTPAUTO |
| ? |
| name=value オプション |
| ver 3.9.4.2 |
|---|
C:\>StreamRelay.NET.x86.exe
StreamRelay.NET.x86.exe ver 3.9.4.2
created by active@window.goukaku.com
StreamRelay.NET.x86.exe [options]
Compiled ver.v4.0.30319
Run ver.v4.0.30319(Win32)
-----------------------------------------
-[Local|Remote]Port "num"
if LocalPort=0 then StdIn/Out Redirect Network (like netcat)
if RemotePort=0 then Redirect to stdin/stdout (like netcat -l)
-[Local|Remote][Input|Output]File <<Path>>
-[Local|Remote][Input][Output]IcmpTunnel <<TunnelType=[ICMPorg|Ping|IPv4OpRRUdp|IPv4OpRRIcmp],Src=IPAddress,Dist=IPAddress,Bind=IPAddress,Type=num,Code=num,headersize=[4|8],IcmpId=num,IcmpSeq=[num|num-num%2cRndArgName],srcPort=num,distPort=num,TTL=[num|num-num[%2cRndArgName]],TOS=hex-hex,DF=[true|false],DataSize=num,FakeDataFile=file,FakeData=URLEncodedString,FakeDataHex=HexString,Interval=num(ms),[LSR|SSR]=csv'sIPv4Address>>
-[Local|Remote][Input][Output]NamedPipe <<pipeName>>
-[Local|Remote][Input][Output]AnonymousPipeServer
-[Local|Remote][Input][Output]AnonymousPipeClient <<pipeId>>
-[Local|Remote]NAudioSound[In|Out] [<<DeviceId>>] (use NAudio & Mic|Speaker)
-[Local|Remote]NAudioSound[In|Out][Wave|MP3|Cue|Aiff] <<[WAVE|MP3|Cue|Aiff]-FileName>>
-[Local|Remote]NAudioSoundInVorbis <<Ogg-FileName>>
-[Local|Remote]NAudioSound[In|Out]Bit (default:16)
-[Local|Remote]NAudioSound[In|Out]Rate (default:44100)
-[Local|Remote]NAudioSound[In|Out]Channel <<1|2>>
-[Local|Remote]NAudioSoundInRecordSecond <<Seconds>>
-[Local|Remote]NAudioSoundOutBitRate (default:128kbps) (only MP3)
-[Local|Remote]SpeachVoiceRecognizerName <<CultureName>>
-[Local|Remote]SpeachVoiceName <<EngineName>>
-[Local|Remote]SpeachVoiceRate <<-10〜+10>>
-[Local|Remote]SpeachVoiceVolume <<0〜+100>>
-[Local|Remote]([Input|Output])TCPHost <<host>>
-[Local|Remote]([Input|Output])TCPPort <<port>>
-[Local|Remote]([Input|Output])TCPSourceHost <<host>>
-[Local|Remote]([Input|Output])TCPSourcePort <<port>>
-Remote([Input|Output])TCP[LSR|SSR] <<csv'sIPv4Address>>
-[Local|Remote][Input|Output]UrlFile <<url>>
CheckCert
CertFile=<<FileName>> (ClientCert From File)
CertPass=<<ClientCertFile's Password>>
ftp[s]://<<User>>:<<Password>>@<<Host>>:<<Port>>/<<Path>>#Options&Options...
PASV
tempFile (OnlyUpload)
tempMem (OnlyUpload)
http[s]://<<User>>:<<Password>>@<<Host>>:<<Port>>/<<Path>>#Options&Options...
post=<<FileName>> (PostData From File) (OnlyDownload)
header=<<name:value>>
Proxy=<<host:port>>
ProxyCredential=<<user:pass>>
ProxyCredentialusedefaultCredential
UseDefaultCredential
UseDefaultProxy
http10 (Use HTTP 1.0)
http11 (Use HTTP 1.1)
AutoRedirect (Allow AutoRedirect)
ContentType=<<value>>
Method=<<value>> (Default=GET) uploadDefault=PUT
tempFile (OnlyUpload)
tempMem (OnlyUpload)
(OnlyUpload) mailto[s]:<<sendaddress>>?Options&Options...
Server=<<SmtpServerHost:port>> ... need
Subject=<<Title>> ... need
fromAddress=<<MailAddress>> ... need
toAddress=<<MailAddress>>
ccAddress=<<MailAddress>>
bccAddress=<<MailAddress>>
Sender=<<MailAddress>>
ReplyTo=<<MailAddress>>
User=<<SmtpAuthUser>>
Pass=<<SmtpAuthPassword>>
SSL (Use STARTTLS)
DataCharset=<<CharsetName>> (default=Encoding.Default)
MailCharset=<<CharsetName>> (default=iso-2022-jp) (Body&Subject)
MailBodyCharset=<<CharsetName>> (default=iso-2022-jp)
MailSubjectCharset=<<CharsetName>> (default=iso-2022-jp)
NewStyle (Dont Use 7bit Style & Body/Subject is UTF8)
file://<<FullPath>> {file:///c:/boot.ini}
-[Local|Remote][Input|Output]UrlFile <<url>>
ws[s]://<<User>>:<<Password>>@<<Host>>:<<Port>>/<<Path>>#Options&Options...
CertFile=<<FileName>> (ClientCert From File)
CertPass=<<ClientCertFile's Password>>
Header=<<RequestHeader>>
UseDefaultCredentials
-[Local|Remote][Input|Output]FileC <<path>>
-[Local|Remote]SoundRecord [<<GUID>>]
-[Local|Remote]SoundRecordBit <<8|16>>
-[Local|Remote]SoundRecordHz <<8000|11025|22050|44100>>
-[Local|Remote]SoundRecordBufSec <<sec>>
-[Local|Remote]InputMic : stdin Redirect from Mic (SoundRecord)
if [Local|Remote]Port=-1 then Redirect to program
-[Local|Remote]Program "ProgramPath"
-[Local|Remote]TempDirectory "DirectoryPath"
-[Local|Remote]Arguments "args"
if [Local|Remote]Port=-2 then NamedPipe Stream
-[Local|Remote]Name "Name"
if [Local|Remote]Port=-4 then SerialPort Stream
-[Local|Remote]COMName "ComPortName"
-[Local|Remote]BaudRate "BaudRate(9600)"
-[Local|Remote]Parity "Parity(None)" [None|Odd|Even|Mark|Space]
-[Local|Remote]DataBits "DataBits(8)"
-[Local|Remote]StopBits "StopBits(1)" [0|1|1.5|2]
-[Local|Remote]DtrDisable
-[Local|Remote]RtsDisable
if 0 < LocalPort then TCP/IP port
-LocalHost "Hostname" : Bind Address
default : "0.0.0.0"
-RemoteHost "Hostname" : Redirect Host or NamedPipe or .NETRemoting Server
-----------------------------------------
-[Local|Remote]Udp : Use UDP (Default : TCP)
-[Local|Remote]Udp2nd : 2nd Connection Use UDP (Default : TCP)
-[Local|Remote]UdpTimeout : UdpConnection Timeout (UdpTimeout*ThreadInterval(ms))
-[Local|Remote]SourceAddress "IPAddress" : Allowed/mySelf SourceAddress
-[Local|Remote]SourcePort "num" : Allowed/mySelf SourcePort
-----------------------------------------
-[Local|Remote]SeparateConnection : use 2nd Connection(1st:Read,2nd:Write)
-[Local|Remote]Host2nd "2ndHostname" : 2nd Redirect/Bind Host(Writing)
-[Local|Remote]Port2nd "num" : 2nd Redirect/Bind Port
-[Local|Remote]SourceAddress2nd "IPAddress" : 2nd SourceAddress
-[Local|Remote]SourcePort2nd "num" : 2nd SourcePort
-Remote[LSR|SSR] "CSV's IPv4address" : [Loose|Strict]SourceRouting
-Remote[LSR|SSR]2nd "CSV's IPv4address" : 2nd [Loose|Strict]SourceRouting
-ZeroIO : Connected only (like netcat -z)
-NonBroadcast : noBroadcast mode
-Broker : Broker mode
-----------------------------------------
-[Local|Remote]RemotingName "name" : .NET Remoting Public Name
-[Local|Remote]RemotingSecure : .NET Remoting use SecureChannel
-[Local|Remote]RemotingType "type" : .NET Remoting Type [tcp|http|ipc]
-[Local|Remote]RemotingHeartbeat : .NET Remoting do Heartbeat
-----------------------------------------
-[Input|Output][Request|Response]Charset "name"
-[Local|Remote]Charset "name"
: SetCharset [Input|Output][Request|Response]
-----------------------------------------
-[Local|Remote]Proxy "uri" : Set Proxy
uri is "<<scheme>>://[<<username>>[:<<password>>]@]<<host>>:<<port>>"
scheme :
(-RemoteProxy only)
telnet://[<<username>>[:<<password>>]@]/cmd1/cmd2...[?[NTLM][&user=<<Message>>][&pass=<<Message>>]]
socks4://[<<username>>[:<<password>>]@]<<host>>:<<port>>
socks4a://[<<username>>@]<<host>>:<<port>>
socks5://[<<username>>[:<<password>>]@]<<host>>:<<port>>
connect://[<<username>>[:<<password>>]@]<<host>>:<<port>>
WebSocket://[<<username>>[:<<password>>@<<Host>>:<<port>>]/<<URI>>?][<<name>>=value],...
[hostname=<<hostname>>]& (default:localhost)
[uri=<<URI>>]& ( (default:/)
[method=<<value>>]& (default:GET)
[Sec-WebSocket-Key=<<base64encoded>>]&
[Sec-WebSocket-Key-Auto=<<RandomOptions>>]&
[Sec-WebSocket-Protocol=<<protocolName>>]&
[Sec-WebSocket-Extensions=<<options>>]&
[origin=<<value>>]&
username default : "anonymous"
http2://[<<username>>[:<<password>>@<<Host>>:<<port>>]/<<URI>>?][<<name>>=value],...
[hostname=<<hostname>>]& (default:localhost)
[uri=<<URI>>]& ( (default:/)
[method=<<value>>]& (default:GET)
[http2mode=<<h2|h2c>>]& (default:h2c)
username default : "anonymous"
(-LocalProxy only)
http://[/?] (LocalServer is HTTP Proxy)
[DropConnect=true]&
[AutoSSL([Server|Client])=true]&
[NeedClientCert=true]&
[[Local|Remote]CertFile=<<FilePath>>]&
[[Local|Remote]CertPassword=<<password>>]&
[[Local|Remote]UseCertRevocationList=True]
[[Local|Remote]Protocol=[NONE|SSL2|SSL3|TLS|DEFAULT|TLS11|TLS12|TLS13]]
[[LSR|SSR]=<<CSV's IPv4address>>]
(-LocalProxy/-RemoteProxy)
ssl://
[<<host>>]/? (only RemoteClient)
no Host is no SSL Server Check
[CertFile=<<FilePath>>]&
[CertPassword=<<password>>]&
[NeedClientCert=true]& (only LocalServer)
[UseCertRevocationList=true]&
[Protocol=[NONE|SSL2|SSL3|TLS|DEFAULT|TLS11|TLS12|TLS13|all]]&
[Server|Client]
starttls:///?command=<<StartCommand>>&SuccessMessage=<<Message>>
[<<host>>]/? (only RemoteClient)
no Host is no SSL Server Check
[CertFile=<<FilePath>>]&
[CertPassword=<<password>>]&
[NeedClientCert=true]& (only LocalServer)
[UseCertRevocationList=true]&
[Protocol=[NONE|SSL2|SSL3|TLS|DEFAULT|TLS11|TLS12|TLS13|all]]&
[Server|Client]
[StartTLSServer|StartTLSClient|StartTLSClientNoDelay]
netstream://[/?][/[option][&[option]...]
([Encrypt|Decrypt])CipherAlgorithm=<<name>>
([Encrypt|Decrypt])CipherAlgorithm=<<name>>/<<mode>>/<<padding>>
([Encrypt|Decrypt])CipherPassword(Hex)=<<Value|HexValue>>
([Encrypt|Decrypt])CipherPassword(Hex)FromGUI
([Encrypt|Decrypt])CipherPasswordHashAlgorithm=<<value>>
([Encrypt|Decrypt])CipherIV(Hex)=<<Value|HexValue>>
([Encrypt|Decrypt])CipherIV(Hex)FromGUI
([Encrypt|Decrypt])CipherRounds=<<num>> : (0<) Only RC5/64Bit
CipherECDH
[Input|Output]HashAlgorithm=<<name>>
[Input|Output]KeyMacAlgorithm(Hex)=<<name>>;<<Key|HexKey>>
[Input|Output]AllHashAlgorithm(Hex)(=<<Key>>)
NTLM
DPAPI : use DPAPI
DPAPIEntropy[Hex]=<<(Hex)value>> : Set DPAPIEntropy
DPAPIScope=<Option> Set DPAPI Scope (default:CurrentUser)
DataProtection=[CurrentUser|LocalMachine]
MemoryProtection=[CrossProcess|SameLogon|SameProcess]
httptunnel://[/?][option]
[mode=[GNU|Simple]]&
[SeparateTCP]&
[SessionID=<<SessIDName(blank is SimpleMode)>>]& <- ServerOnly
[SessionID=("num")|("min"-"max")[,"RandomizeOption"]& <- ClientOnly
[HttpHeaderFileName=<<file>>]& <- need
mailauth://[<<username>>[:<<password>>@<<popHost|EHLODomain>>:<<popPort>>]/<<AuthType>>?][<<name>>=value],...
AuthType: PLAIN (SMTP/POP Auth PLAIN)
: LOGIN (SMTP/POP Auth LOGIN)
: CRAM-MD5 (SMTP/POP Auth CRAM-MD5)
: DIGEST-MD5 (SMTP/POP Auth DIGEST-MD5)
: POP3BS (POP before SMTP)
: APOPBS (POP before SMTP)
: APOP (APOP in POP3 Auth)
: POP3 (normal POP3 Auth)
: SMTP-AUTO (SMTP Auth DIGEST-MD5/CRAM-MD5/LOGIN/PLAIN) (need <<EHLODomain>>)
Encoding=<<charSet>> (default utf-8)
CNonce=<<(Base64String)>> (use DIGEST-MD5)
CNonceHex=<<Base16String>> (use DIGEST-MD5)
CNonceRand=("num")|("min"-"max")[%2c"RandomizeOption"] (use DIGEST-MD5)
NC=<<Count>> (Default: 00000001) (use DIGEST-MD5)
UserName2nd=<<AuthrizeID>> (use PLAIN)
URI=<<URIHeader>> (DigestURI=URI+Realm) (Default: smtp/local/) (use DIGEST-MD5)
[LSR|SSR]=<<CSV's IPv4address>>
-ProxyList "uri list File"
-----------------------------------------
-DebugMode/-Debug : DebugMode
-Debug(Mode)NoRead : DebugMode but no Read Method in Stream
-VerboseMode/Verbose : VerboseMode
-VerboseSSLMode : SSL VerboseMode
-nochecklocalhost : don't check source host argument
-AllowHalfOpen : Allowed Half Stream Open
-ListMyIPAddress : Display MyIPAddresss
-ListNIC : Display My Network Interface Card
-ListEnvironment : Display Environment Variables
-ListCharset : Display Character Set List
-ListCipher : Display Cipher List
-ListHash : Display Hash List
-ListHMAC : Display HMAC List
-ListPasswordStirring: Display PasswordStirring List
-ListRandomize : Display List Randomize Option
-ListRndNumber <"min"-"max","RandomizeOption">
: Display RandomNumber
-ListRndNumberCount <num> : Display RandomNumber Execute Count
-ListRndNumberdevrandom : Display Only RandomNumber (like /dev/urandom)
-ListNAudioDevices : Listing Sound Input/Output Device
-ListVoice : Display Installed VoiceEngine List
-ListVoiceRecognizer : Display Installed VoiceRecognizerEngine List
-ListAllCulture : Display List CultureInfo List(All)
-ListInstalledCulture: Display List CultureInfo List(InstalledOnly)
-ListNeutralCulture : Display List CultureInfo List(Neutral)
-ListSpecificCulture : Display List CultureInfo List(Specific)
-ListMicrophone : Display List InputSoundDevice
-ListSpeaker : Display List OutputSoundDevice
-ListFilter : Display List Filter/Compression Algorithm Option
-ListPlugins : Display List Loading Plugins
-----------------------------------------
-Logging : Loging to stdout
-LoggingHex : Loging to stdout(Hex)
-LoggingCharSet "ChasetName" : Loging CharSet
-LoggingFile "Filename" : Loging to "File"
-LoggingSpeed : Loging NetworkSpeed to stdout
-LoggingGUI : Loging to GUIForm
-----------------------------------------
-r "ReplaceURL" : Add URL String
-----------------------------------------
-RegularExpressionMatch <<RegularExpressionString>>
-RegularExpressionReplace <<RegularExpressionString>> <<ReplaceString>>
-JScriptFile <<FilePath>> [<<CharSet>>] : Script File(JScript.NET)
-BooFile <<FilePath>> [<<CharSet>>] : Script File(Boo0.9.7)
-iPythonFile <<FilePath>> [<<CharSet>>] : Script File(IronPython2.7/3.4)
-iRubyFile <<FilePath>> [<<CharSet>>] : Script File(IronRuby1.1)
-LuaFile <<FilePath>> [<<CharSet>>] : Script File(NLua(Lua5.2))
-VBScriptFile <<FilePath>> [<<CharSet>>] : Script File(ActiveScript{VBScript/x86})
-----------------------------------------
-BufferSize "Num" : Recv buffer size (byte)(<32)
(default is 2048
-ThreadInterval "Num" : "While" Loop IntervalTime in Thread (msec)
(default is 500
-MaxConnection "Num" : (0 is Infinity)(default is 0)
-----------------------------------------
-ConnectedDelayTime ("num")|("min"-"max")[,"RandomizeOption"]
delay time of between Connect/ProxyExecute and 1st data packet (sec)
-[Remote|Local]FragmentSize ("num")|("min"-"max")[,"RandomizeOption"]
FragmentSize (byte)
-[Remote|Local]FragmentDelayTime ("num")|("min"-"max")[,"RandomizeOption"]
interval time of fragment packet sending (sec)
-----------------------------------------
-ConfigFile "FileName" : Setting per line in file
-Registry "SubKeyName": Setting from Registry(HKLM\SOFTWARE\UrlRewriteProxy\<SubKey>)
-----------------------------------------
-install : Install to NTService
-uninstall : Uninstall to NTService
-service : only NTService mode
----------------------------------------- |
| シリアルポート(COM9)へ接続する |
|---|
| StreamRelay.NET.exe -LocalPort 0 -RemotePort -4 -RemoteCOMName COM9 |
| 名前付きパイプ(StreamRelay)へ接続する |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort -2 -RemotePort 0 -LocalName StreamRelay |
| StreamRelay.NET.exe -VerboseMode -LocalPort 0 -RemotePort -2 -RemoteName StreamRelay -RemoteHost 192.0.2.1 |
| netcat のクライアント・モード |
|---|
| nc.exe -nvv 192.0.2.1 90 |
| StreamRelay.NET.exe -VerboseMode -LocalPort 0 -RemoteHost 192.0.2.1 -RemotePort 90 |
| netcat のポート開閉確認 |
|---|
| nc.exe -nvv -z 192.0.2.1 90 |
| StreamRelay.NET.exe -VerboseMode -LocalPort 0 -RemoteHost 192.0.2.1 -RemotePort 90 -ZeroIO |
| netcat のサーバ・モード |
|---|
| nc.exe -nvv -L -p 90 |
| StreamRelay.NET.exe -VerboseMode -LocalPort 90 -RemotePort 0 |
| ncat のようなブローカーモード |
|---|
| StreamRelay.NET.exe -localport 90 -remoteport 0 -Broker |
| ncat のようなブローカーモードでログを記録 |
|---|
| StreamRelay.NET.exe -localport 90 -remoteport 0 -Broker -LoggingFile log.txt |
| netcat のリモートシェル・サーバ・モード |
|---|
| nc.exe -nvv -L -p 90 -e cmd.exe |
| StreamRelay.NET.exe -VerboseMode -LocalPort 90 -RemoteProgram cmd.exe -RemotePort -1 |
| netcat のリバース・リモートシェル・サーバ・モード |
|---|
| nc.exe -nvv 192.0.2.1 90 -e cmd.exe |
| StreamRelay.NET.exe -VerboseMode -LocalProgram cmd.exe -LocalPort -1 -RemoteHost 192.0.2.1 -RemotePort 90 |
| OpenSSL のクライアント・モード |
|---|
| openssl.exe s_client -host 192.0.2.1 -port 443 |
| StreamRelay.NET.exe -VerboseMode -LocalPort 0 -RemoteHost 192.0.2.1 -RemotePort 443 -RemoteProxy ssl:///? |
| クライアント認証のある SSL サーバへアクセス |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort 0 -RemoteHost 192.0.2.1 -RemotePort 443 -RemoteProxy ssl://《サーバ証明書のCN名》/?CertFile=《クライアント証明書ファイル》^&CertPassword=《証明書ファイルのパスワード》 |
| クライアント証明書を提示する前にサーバ証明書の検証が入るらしい |
| SSL サーバへ SSL2 のみでアクセス |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort 0 -RemoteHost 192.0.2.1 -RemotePort 443 -RemoteProxy ssl:///?Protocol=SSL2 |
| 二つの TCP の方向と SSL の方向を逆にして接続する |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort 91 -RemoteHost 192.0.2.1 -RemotePort 444 -RemoteProxy ssl:///?Server^&CertFile=《クライアント証明書ファイル》^&CertPassword=《証明書ファイルのパスワード》 |
| StreamRelay.NET.exe -VerboseMode -LocalPort 444 -RemoteHost 192.0.2.2 -RemotePort 80 -LocalProxy ssl:///?Client^& |
![]() |
| winrelay と同等 |
|---|
| winrelay.exe -lp 90 -dip 192.0.2.1 -dp 80 |
| StreamRelay.NET.exe -VerboseMode -LocalPort 90 -RemoteHost 192.0.2.1 -RemotePort 80 |
| winrelay と同等、さらに通信ログを画面に出力 |
|---|
| winrelay.exe -lp 90 -dip 192.0.2.1 -dp 80 |
| StreamRelay.NET.exe -VerboseMode -LocalPort 90 -RemoteHost 192.0.2.1 -RemotePort 80 -Logging |
| winrelay と同等、さらに通信ログを16進数で画面に出力 |
|---|
| winrelay.exe -lp 90 -dip 192.0.2.1 -dp 80 |
| StreamRelay.NET.exe -VerboseMode -LocalPort 90 -RemoteHost 192.0.2.1 -RemotePort 80 -LoggingHex |
| winrelay と同等、さらに通信ログのバイナリを UTF8 として変換しつつ画面に出力 |
|---|
| winrelay.exe -lp 90 -dip 192.0.2.1 -dp 80 |
| StreamRelay.NET.exe -VerboseMode -LocalPort 90 -RemoteHost 192.0.2.1 -RemotePort 80 -Logging -LoggingCharset UTF-8 |
| sTunnel と同等 |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort 80 -RemoteHost 192.0.2.1 -RemotePort 443 -RemoteProxy ssl:// |
| ZeBeDee のような VPN |
|---|
| localhost -(平文)- localhost:90 -(暗号化)- 192.0.2.1:10990 -(平文)- サーバ(192.0.2.2)(80/tcp) |
| StreamRelay.NET.exe -VerboseMode -LocalPort 90 -RemoteHost 192.0.2.1 -RemotePort 10990 -RemoteProxy netstream:///?CipherAlgorithm=AES^&CipherECDH |
| StreamRelay.NET.exe -VerboseMode -LocalPort 10990 -RemoteHost 192.0.2.2 -RemotePort 80 -LocalProxy netstream:///?CipherAlgorithm=AES^&CipherECDH |
| Java 版を使用した方がいいと思う |
| ファイル転送 |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort 0 -LocalInputFile abc.txt -RemoteHost 192.0.2.1 -RemotePort 90 |
| StreamRelay.NET.exe -VerboseMode -LocalPort 90 -RemotePort 0 -RemoteOutputFile abc.txt |
| netcat のクライアント・モードで、ファイルから入力 |
|---|
| c:\> type abc.txt HEAD / HTTP/1.0 c:\> nc.exe -nvv 192.0.2.1 90 < abc.txt |
| c:\> type abc.txt HEAD / HTTP/1.0 c:\> StreamRelay.NET.exe -VerboseMode -LocalPort 0 -LocalInputFile abc.txt -AllowHalfOpen -RemoteHost 192.0.2.1 -RemotePort 90 |
| netcat のサーバ・モードで、疑似 Web サーバ |
|---|
| c:\> type index.htm HTTP/1.0 200 OK Content-Type: text/html Content-Length: 5 Hello c:\> nc.exe -nvv -L -p 80 192.0.2.1 < index.htm |
| c:\> type index.htm HTTP/1.0 200 OK Content-Type: text/html Content-Length: 5 Hello c:\> StreamRelay.NET.exe -VerboseMode -LocalPort 80 -RemotePort 0 -RemoteInputFile index.htm -NonBroadCast |
| HTTP Proxy(Connect) Server(192.0.2.3:8080) を経由して、192.0.2.4:80 へ接続する(自分は 91/tcp で待機) |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort 91 -RemoteHost 192.0.2.4 -RemotePort 80 -RemoteProxy connect://192.0.2.3:8080 |
![]() |
| SOCKSv4a(192.0.2.3:90) で接続して、さらに HTTP Proxy(Connect) Server(192.0.2.5:8080) を経由して、192.0.2.4:80 へ接続する(自分は 91/tcp で待機) |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort 91 -RemoteHost 192.0.2.4 -RemotePort 80 -RemteProxy socks4a://192.0.2.3:90 -RemoteProxy connect://192.0.2.5:8080 |
![]() |
![]() |
![]() |
| GNU HTTP Tunnel のクライアントと同等(固定セッションID)(95/tcpで待機して、HTTPTunnelサーバの192.0.2.1:96/tcpへ転送する) |
|---|
| htc.exe --no-daemon --forward-port 95 192.0.2.1:96 |
| StreamRelay.NET.exe -VerboseMode -LocalPort 95 -RemoteHost 192.0.2.1 -RemotePort 96 -RemoteProxy httptunnel:///?mode=GNU^&HttpHeaderFileName=req.txt^&SeparateTCP |
| req.txt is Sample\req.txt |
| GNU HTTP Tunnel のクライアントと同等(動的セッションID)(95/tcpで待機して、HTTPTunnelサーバの192.0.2.1:96/tcpへ転送する) |
|---|
| htc.exe --no-daemon --forward-port 95 192.0.2.1:96 |
| StreamRelay.NET.exe -VerboseMode -LocalPort 95 -RemoteHost 192.0.2.1 -RemotePort 96 -RemoteProxy httptunnel:///?mode=GNU^&HttpHeaderFileName=req1.txt^&SeparateTCP^&SessionID=4-20000%2cCryptoRandom |
| req.txt is Sample\req1.txt |
| GNU HTTP Tunnel のサーバと同等(動的セッションID)(96/tcpで待機して、192.0.2.2:97/tcpへ転送する) |
|---|
| hts.exe --no-daemon --forward-port 192.0.2.2:97 96 |
| StreamRelay.NET.exe -VerboseMode -LocalPort 96 -RemoteHost 192.0.2.2 -RemotePort 97 -LocalProxy httptunnel:///?mode=GNU^&HttpHeaderFileName=res.txt^&SeparateTCP^&SessionID=crap |
| res.txt is Sample\res.txt |
| GNU HTTP Tunnel よりも隠蔽度の高くしてみた(95/tcp→192.0.2.1:96) |
|---|
| StreamRelay.NET.exe -LocalPort 95 -RemotePort 96 -RemoteHost 192.0.2.1 -Verbose -RemoteProxy httptunnel:///?SeparateTCP^&mode=simple^&HttpHeaderFileName=req1.txt^&SessionID=4-10000%2cCryptoRandom -RemoteProxy netstream:///?WebFormEncode -RemoteProxy netstream:///?UrlEncode |
| StreamRelay.NET.exe -LocalPort 96 -RemoteHost 192.0.2.2 -RemotePort 97 -Verbose -LocalProxy httptunnel:///?SeparateTCP^&mode=Simple^&HttpHeaderFileName=res.txt^&SessionID=crap -LocalProxy netstream:///?WebFormDecode -LocalProxy netstream:///?UrlDecode |
| req.txt is Sample\req1.txt res.txt is Sample\res.txt |
![]() |
| 二つの netcat に接続する bash と同等 |
|---|
| nc.exe -nvv -L -p 81 nc.exe -nvv -L -p 82 |
| bash < /dev/tcp/192.0.2.1/81 > /dev/tcp/192.0.2.1/82 |
| StreamRelay.NET.exe -VerboseMode -LocalPort -1 -RemoteHost 192.0.2.1 -RemotePort 81 -RemoteSeparateConnection -RemotePort2nd 82 -LocalProgram cmd.exe |
| HttpProxy サーバ(8082/tcp)(HTTPonly)として動作させる |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort 8082 -LocalProxy http:// |
| HttpProxy サーバ(8082/tcp)(HTTP&HTTPS)として動作させる |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort 8082 -LocalProxy http://?DropConnect=true |
| HttpProxy サーバ(8082/tcp)として動作させる(CONNECT の場合は、SSL終端としてSSLも代理する) |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort 8082 -LocalProxy http:///?AutoSSLClient=true^&AutoSSLServer=true^&LocalCertFile=《証明書ファイル》^&LocalCertPassword=《証明書ファイルのパスワード》 |
| StreamRelay.NET.exe -VerboseMode -LocalPort 8082 -LocalProxy http:///?AutoSSL=true^&LocalCertFile=《証明書ファイル》^&LocalCertPassword=《証明書ファイルのパスワード》 |
| HttpProxy サーバ(8082/tcp)として動作させるが特定の HTTPS サーバ(192.0.2.1:443)へ転送させる(よって CONNECT メソッドは捨てる) |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort 8082 -LocalProxy http:///?AutoSSLClient=true^&AutoSSLServer=true^&LocalCertFile=《証明書ファイル》^&LocalCertPassword=《証明書ファイルのパスワード》^&DropConnect=true -RemoteHost 192.0.2.1 -RemotePort 443 |
| StreamRelay.NET.exe -VerboseMode -LocalPort 8082 -LocalProxy http:///?AutoSSL=true^&LocalCertFile=《証明書ファイル》^&LocalCertPassword=《証明書ファイルのパスワード》^&DropConnect=true -RemoteHost 192.0.2.1 -RemotePort 443 |
| HttpProxy サーバ(8082/tcp)として動作させるが特定の HTTP サーバ(192.0.2.1:80)へ転送させる(よって CONNECT メソッドは捨てる) |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort 8082 -LocalProxy http:///?AutoSSLServer=true^&LocalCertFile=《証明書ファイル》^&LocalCertPassword=《証明書ファイルのパスワード》^&DropConnect=true -RemoteHost 192.0.2.1 -RemotePort 80 |
| HttpProxy サーバ(8082/tcp)として動作させるが上位 HTTP サーバ(192.0.2.1:8080)へ転送させる |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort 8082 -LocalProxy http:///?AutoSSL=true^&LocalCertFile=《証明書ファイル》^&LocalCertPassword=《証明書ファイルのパスワード》^& -RemoteHost 192.0.2.1 -RemotePort 8080 |
| tcp/90→192.0.2.1:91までを画数エンコードを実施する(乱数は「Random」。ノイズ発生確率は「ノイズ文字数/(ノイズ文字数+10)」で乱数は「Random」)。tcp/91で受信した内容は画面に出力する |
|---|
| StreamRelay.NET.exe -LocalPort 90 -RemotePort 91 -RemoteHost 192.0.2.1 -RemoteProxy netstream:///?StrokeEncode=VocabRandom%3dRandom%26NoiseRandom%3d10%2crandom |
| StreamRelay.NET.exe -LocalPort 92 -RemotePort 0 -LocalProxy netstream:///?StrokeDecode |
| tcp/90→192.0.2.1:91までをShinoEncodeを実施する(乱数は「Random」。ノイズ発生確率は「ノイズ文字数/(ノイズ文字数+10)」で乱数は「Random」。辞書ファイルは「D:\ShinoEncodeDictionary.txt(ノイズの単語含)」。「そのまま/先頭大文字/全部大文字」乱数は「Random」でそれぞれ「10:20:30」の比。単語の最後に記号を付与する乱数は「Random」で辞書ファイルは「D:\ShinoEncodeSymbolDictionary.txt」)。tcp/91で受信した内容は画面に出力する |
|---|
| StreamRelay.NET.exe -LocalPort 90 -RemotePort 91 -RemoteHost 192.0.2.1 -RemoteProxy netstream:///?ShinoEncode=VocabRandom%3dRandom%26NoiseRandom%3d10%2crandom%26VocabDicFile%3dD:\ShinoEncodeDictionary.txt%26CaseRandom%3d10/20/30%2crabdom%26SymbolRandom%3drandom%26SymbolDicFile%3dD:\ShinoEncodeSymbolDictionary.txt |
| StreamRelay.NET.exe -LocalPort 92 -RemotePort 0 -LocalProxy netstream:///?ShinoDecode |
| 互いに NTLM 認証([ワークグループ|ドメイン]\ユーザ名)を実施する |
|---|
| StreamRelay.NET.exe -LocalPort 90 -RemotePort 91 -RemoteHost 192.0.2.1 -RemoteProxy netstream:///?NTLM |
| StreamRelay.NET.exe -LocalPort 91 -RemotePort 80 -RemoteHost 192.0.2.2 -LocalProxy netstream:///?NTLM |
| Web Get の代替 |
|---|
| wget.exe http://www.example.com/ |
| StreamRelay.NET.exe -LocalPort 0 -RemotePort 0 -LocalInputUrlFile http://www.example.com/ |
| 文字コードの変換 |
|---|
| nkf.exe -S -e input.txt < output.txt |
| StreamRelay.NET.exe -VerboseMode -LocalPort 0 -LocalInputFile a.txt -InputRequestCharset Shift_JIS -RemotePort 0 -OutputRequestCharset EUC-JP -RemoteOutputFile output.txt |
| ファイルの内容を表示 |
|---|
| type a.txt |
| StreamRelay.NET.exe -VerboseMode -LocalPort 0 -RemotePort 0 -LocalInputFile a.txt |
| StreamRelay.NET.exe -VerboseMode -LocalPort 0 -RemotePort 0 -LocalInputFileC a.txt |
| ファイルのNTFS代替ストリーム内容を表示 |
|---|
| type a.txt:HEHEHE |
| StreamRelay.NET.exe -VerboseMode -LocalPort 0 -RemotePort 0 -LocalInputFileC a.txt:HEHEHE |
| キーボードからの入力をファイルのNTFS代替ストリームに保存 |
|---|
| notepad.exe a.txt:HEHEHE |
| StreamRelay.NET.exe -VerboseMode -LocalPort 0 -RemotePort 0 -RemoteOutputFileC a.txt:HEHEHE |
| ファイルコピー(代替ストリームは消えてしまうはず) |
|---|
| copy a.txt b.txt |
| StreamRelay.NET.exe -VerboseMode -LocalPort 0 -LocalInputFile a.txt -RemotePort 0 -RemoteOutputFile b.txt |
| 二つのファイルコピー |
|---|
| copy a.txt b.txt && copy x.txt y.txt |
| StreamRelay.NET.exe -VerboseMode -LocalPort 0 -LocalInputFile a.txt -LocalOutputFile y.txt -RemotePort 0 -RemoteOutputFile b.txt -RemoteInputFile x.txt -AllowHalfOpen |
| スクリプト・コマンドっぽく |
|---|
| script outputLog.txt |
| StreamRelay.NET.exe -LocalPort 0 -RemotePort -1 -RemoteProgram cmd.exe -LoggingFile outputLog.txt |
| ファイルの圧縮 |
|---|
| gzip.exe a.txt |
| StreamRelay.NET.exe -LocalPort 0 -LocalInputFile a.txt -RemotePort 0 -RemoteOutputFile a.txt.gz -RemoteProxy netstream:///?gzipCompress |
| ファイルの解凍(gzip の解凍) |
|---|
| gzip.exe -d a.txt.gz |
| StreamRelay.NET.exe -LocalPort 0 -LocalInputFile a.txt.gz -RemotePort 0 -RemoteOutputFile log.txt -LocalProxy netstream:///?gzipDeCompress |
| ハッシュ値の計算 |
|---|
| md5sum.exe a.txt |
| StreamRelay.NET.exe -LocalPort 0 -LocalInputFile a.txt -RemotePort 0 -RemoteProxy netstream:///?OutputHashAlgorithm=MD5 |
| 対応している全てのハッシュ値/チェックサム/カウンティングの計算 |
|---|
| StreamRelay.NET.exe -LocalPort 0 -LocalInputFile a.txt -RemotePort 0 -RemoteProxy netstream:///?OutputAllHashAlgorithm |
| FOR /F "usebackq skip=2" %I in (`StreamRelay.NET.exe -ListHash 2^>^&1`) do @StreamRelay.NET.exe -LocalPort 0 -LocalInputFile a.txt -RemotePort 0 -RemoteProxy netstream:///?OutputHashAlgorithm=%I |
| 対応している全てのハッシュ値/チェックサム/カウンティング/HMACの計算 |
|---|
| StreamRelay.NET.exe -LocalPort 0 -LocalInputFile a.txt -RemotePort 0 -RemoteProxy netstream:///?OutputAllHashAlgorithm=《鍵》 |
| NodeJS っぽくサーバサイドスクリプトを実現する (動かすスクリプトは ECHO サーバ)(スクリプトは JScript.NET) |
|---|
| StreamRelay.NET.exe -LocalPort 91 -RemotePort 0 -JScriptFile echo.js -VerboseMode |
| ファイルを圧縮しつつ、圧縮前と圧縮後のチェックサムとハッシュ値を表示 |
|---|
| StreamRelay.NET.exe -LocalPort 0 -LocalInputFile a.txt -RemotePort 0 -RemoteOutputFile a.txt.gz -RemoteProxy netstream:///?gzipCompress^&OutputHashAlgorithm=MD5^&OutputHashAlgorithm=CRC32 -LocalProxy netstream:///?InputHashAlgorithm=MD5^&InputHashAlgorithm=CRC32 |
| リアルタイム圧縮で通信を圧縮する |
|---|
| StreamRelay.NET.exe -LocalPort 0 -RemotePort 90 -RemoteHost 192.0.2.1 -RemoteProxy netstream:///?zlibCompress^&zliDeCompress |
| StreamRelay.NET.exe -LocalPort 90 -RemotePort 0 -LocalProxy netstream:///?zlibCompress^&zliDeCompress |
| BinHEX エンコードを実施 |
|---|
| StreamRelay.NET.exe -LocalPort 0 -RemotePort 0 -LocalInputFile binhexsource2.txt -RemoteOutputFile binhexsource2.out -RemoteProxy netstream:///?BinHexEncode -RemoteProxy netstream:///?BinHexCompress |
| StreamRelay.NET.exe -LocalPort 0 -RemotePort 0 -LocalInputFile binhexsource2.txt -RemoteOutputFile binhexsource2.out2 -RemoteProxy netstream:///?BinHexEnCorate -RemoteProxy netstream:///?BinHexEnCode -RemoteProxy netstream:///?BinHexCompress |
| BinHexCUI.exe En binhexsource.txt | StreamRelay.NET.exe -LocalPort 0 -RemotePort 0 -RemoteProxy netstream:///?BinHexEnCorate -RemoteProxy netstream:///?BinHexEnCode -RemoteProxy netstream:///?BinHexCompress |
| BinHEX デコードを実施 |
|---|
| StreamRelay.NET.exe -LocalPort 0 -RemotePort 0 -LocalInputFile binhexraw2.txt -RemoteOutputFile binhexraw2.out -LocalProxy netstream:///?BinHexDecode -LocalProxy netstream:///?BinHexDeCompress |
| StreamRelay.NET.exe -LocalPort 0 -RemotePort 0 -LocalInputFile binhexraw.txt -RemoteOutputFile binhexraw.out -LocalProxy netstream:///?BinHexDeCorate -LocalProxy netstream:///?BinHexDeCode -LocalProxy netstream:///?BinHexDeCompress |
![]() |
| BinHexCUI.exe En binhexsource.txt | StreamRelay.NET.exe -LocalPort 0 -RemotePort 0 -RemoteProxy netstream:///?BinHexEnCorate -RemoteProxy netstream:///?BinHexEnCode -RemoteProxy netstream:///?BinHexCompress | StreamRelay.NET.exe -LocalPort 0 -RemotePort 0 -LocalProxy netstream:///?BinHexDeCorate -LocalProxy netstream:///?BinHexDeCode -LocalProxy netstream:///?BinHexDeCompress | BinHexCUI.exe De binhexsource.txt.out |
| テキストファイル(EnglishText.txt)を音声として読み上げを行う |
|---|
| StreamRelay.NET.exe -LocalPort 0 -LocalInputFile EnglishText.txt -RemotePort 0 -RemoteSpeachVoiceName "Microsoft Anna" |
| テキストファイル(EnglishText.txt)を音声として読み上げを行う |
|---|
| StreamRelay.NET.exe -LocalPort 0 -LocalInputFile EnglishText.txt -RemotePort 0 -RemoteSpeachVoiceName "Microsoft Anna" |
| テキストファイル(JapaneseText.txt)を音声として読み上げを行う(Microsoft Office がインストールされている場合) |
|---|
| StreamRelay.NET.exe -LocalPort 0 -LocalInputFile JapaneseText.txt -RemotePort 0 -RemoteSpeachVoiceName "Microsoft Haruka Desktop" |
| SlimDX ランタイムがインストールされている状況で既定の録音デバイスで録音を実施し、最後に出力ファイルにWAVEヘッダを追加する |
|---|
| StreamRelay.NET.exe -LocalPort 0 -RemotePort 0 -RemoteOutputFile rec.wav -Verbose -LocalSoundRecord 0 SoundChange.exe rec.wav |
| DPAPI(Data Protection API)を使って(エントロピー 0x001122、スコープ(範囲)を現在のユーザ)、ファイルを保護する |
|---|
| StreamRelay.NET.exe -LocalPort 0 -LocalInputFile file -RemotePort 0 -RemoteProxy netstream:///?DPAPI^&DPAPIEntropyHex=001122^&DPAPIScope=CurrentUser -RemoteOutputFile file.out |
| レジストリ(HTLM\SOFTWARE\UrlRewriteProxy\<<SubKeyName>>)から設定を読み込んで起動する |
|---|
| StreamRelay.NET.exe -Registry <<SubKeyName>> |
| ファイルから設定を読み込んで起動する |
|---|
| StreamRelay.NET.exe -ConfigFile <<FilePath>> |
| Windows サービスへ登録 |
|---|
| StreamRelay.NET.exe -install |
| Windows サービスからアンインストール |
|---|
| StreamRelay.NET.exe -uninstall |
| URL Rewrite ツール |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort 80 -RemoteHost 192.0.2.3 -RemotePort 80 -r /webApp/../ |
![]() |
| STARTTLS プロキシとなる(通信{リクエスト方向}を監視して「STARTTLS」を見つけたら SSL 化する) |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort 587 -RemoteHost 192.0.2.3 -RemotePort 587 -RemoteProxy "starttls:///?Command=STARTTLS&SuccessMessage=Ready to start TLS" |
| STARTTLS プロキシとなる(接続後、直ちに SSL 化する) |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort 587 -RemoteHost 192.0.2.3 -RemotePort 587 -RemoteProxy "starttls:///?Command=STARTTLS&SuccessMessage=Ready to start TLS&StartTLSClientNoDelay" |
| StartTLS非対応のメールクライアントでStartTLS必須のメールサーバへ接続できる |
| STARTTLS プロキシとなり DIGEST-MD5 な SMTP 認証を実施する |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort 587 -RemoteHost 192.0.2.3 -RemotePort 587 -RemoteProxy "starttls:///?Command=STARTTLS&SuccessMessage=Ready to start TLS&StartTLSClientNoDelay" -RemoteProxy mailauth://user:password@mail.example.com/DIGEST-MD5?cNonce=AAAAAAAAAAAA |
| StartTLS非対応、DIGEST-MD5認証非対応のメールクライアントでStartTLS必須/SMTP認証必須のメールサーバへ接続できる |
| .NET Remoting で通信する |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort 2000 -RemoteHost 192.0.2.3 -RemotePort 8085 -RemoteRemotingType tcp |
| StreamRelay.NET.exe -VerboseMode -LocalPort 8085 -RemoteHost 192.0.2.4 -RemotePort 2000 -LocalRemotingType tcp |
| -[Local|Remote]RemotingType に指定できるのは「tcp」と「http」と「icp」。「icp」については「-RemoteHost」の指定はしなくてもよい。 既定の接続ポイントは「remoteObj」。変更したい場合は「-[Local|Remote]RemotingName」で指定できる |
![]() |
| ICMPTunnel で通信する |
|---|
| StreamRelay.NET.exe -VerboseMode -LocalPort 2000 -RemoteHost 192.0.2.3 -RemotePort 0 -RemoteOutputIcmpTunnel TunnelType=ICMPorg,Src=192.0.2.2,Dist=192.0.2.3,Type=8,Code=0,headersize=8,TTL=250 -RemoteInputIcmpTunnel TunnelType=ICMPorg,Src=192.0.2.3,Dist=192.0.2.2,Type=0,Code=0,headersize=8,TTL=200-250 |
| StreamRelay.NET.exe -VerboseMode -LocalPort 0 -RemoteHost 192.0.2.4 -RemotePort 2000 -LocalInputIcmpTunnel TunnelType=ICMPorg,Src=192.0.2.2,Dist=192.0.2.3,Type=8,Code=0,headersize=8,TTL=200-250 -LocalOutputIcmpTunnel TunnelType=ICMPorg,Src=192.0.2.3,Dist=192.0.2.2,Type=0,Code=0,headersize=8,TTL=250 |
| StreamRelay.NET.exe 間は ICMPのデータ部で通信が行われる。(192.0.2.2→192.0.2.3 ICMPType=8&ICMPCode=0)&(192.0.2.2←192.0.2.3 ICMPType=0&ICMPCode=0) |
| パケット順が入れ替わらないように送信時には、インターパルを入れている(-SleepTimeオプション) datasizeオプションはICMPデータ部のサイズなので、IPパケットが分割されないようなサイズにするか既定値に任せること TTLの値を送信時にはTTL=250。受信時の範囲は200-250とすることでOS標準のパケットを無視するようにしている |
| 名前 | オプション | 鍵長(byte) | IV(byte) | ライブラリ | 方式 | C:\>StreamRelay.NET.exe -ListCipher ------------------------------------------------ Cipher Algorithm is AES DES RC2 Rijndael TripleDES BC_AES BC_AESFast BC_AESLight BC_Blowfish BC_Camellia BC_CamelliaLight BC_CAST5 BC_CAST6 BC_DES BC_DESEDE BC_GOST28147 BC_IDEA BC_Threefish BC_RC2 BC_RC5_32 BC_RC5_64 BC_Rijndael BC_SEED BC_Serpent BC_Tnepres BC_SKIPJACK BC_TEA BC_Twofish BC_XTEA BC_Noekeon BC_RC6 BC_RC4 BC_HC128 BC_HC256 BC_Salsa20 BC_XSalsa20 BC_CHACHA BC_ChaCha7539 BC_ISAAC BC_VMPC BC_VMPCKsa3 BC_Dstu7624_128 BC_Dstu7624_256 BC_Dstu7624_512 BC_SM4 PkZip |
|---|---|---|---|---|---|---|
| RC2 | RC2 | 5-16 | 8 | 標準 | ブロック | |
| AES | AES | 16/24/32 | 16 | 標準 | ブロック | |
| Rijndael | Rijndael | 16/24/32 | 16 | 標準 | ブロック | |
| DES | DES | 8 | 8 | 標準 | ブロック | |
| 3DES | TripleDES | 16/24 | 8 | 標準 | ブロック | |
| AES | BC_AES | 16/24/32 | ブロックサイズ | Bouncy Castle | ブロック | |
| AES | BC_AESFast | 16/24/32 | ブロックサイズ | Bouncy Castle | ブロック | |
| AES | BC_AESLight | 16/24/32 | ブロックサイズ | Bouncy Castle | ブロック | |
| Camellia | BC_Camellia | 16/24/32 | ブロックサイズ | Bouncy Castle | ブロック | |
| Camellia | BC_CamelliaLight | 16/24/32 | ブロックサイズ | Bouncy Castle | ブロック | |
| CAST5 | BC_CAST5 | -16 | ブロックサイズ | Bouncy Castle | ブロック | |
| CAST6 | BC_CAST6 | 1- | ブロックサイズ | Bouncy Castle | ブロック | |
| DES | BC_DES | 8-(おそらく8以上は無視している) | 8 | Bouncy Castle | ブロック | |
| 3DES | BC_DESEDE | 16/24 | 8 | Bouncy Castle | ブロック | |
| GOST28147 | BC_GOST28147 | 32 | ブロックサイズ | Bouncy Castle | ブロック | |
| IDEA | BC_IDEA | 1- | ブロックサイズ | Bouncy Castle | ブロック | |
| RC2 | BC_RC2 | 1- | ブロックサイズ | Bouncy Castle | ブロック | |
| RC5(32bit) | BC_RC5_32 | 1- | ブロックサイズ | Bouncy Castle | ブロック | |
| RC5(64bit) | BC_RC5_64 | -255 | ブロックサイズ | Bouncy Castle | ブロック | |
| Rijndael | BC_Rijndael | 16/20/24/32 | ブロックサイズ | Bouncy Castle | ブロック | |
| SEED | BC_SEED | 16- | ブロックサイズ | Bouncy Castle | ブロック | |
| Serpent | BC_Serpent | 4の倍数 | ブロックサイズ | Bouncy Castle | ブロック | |
| Tnepres | BC_Tnepres | 4の倍数 | ブロックサイズ | Bouncy Castle | ブロック | |
| SKIPJACK | BC_SKIPJACK | 10- | ブロックサイズ | Bouncy Castle | ブロック | |
| TEA | BC_TEA | 16- | ブロックサイズ | Bouncy Castle | ブロック | |
| Blowfish | BC_Blowfish | 1- | ブロックサイズ | Bouncy Castle | ブロック | |
| Twofish | BC_Twofish | 1- | ブロックサイズ | Bouncy Castle | ブロック | |
| Threefish | BC_Threefish | 32/64/128 | ブロックサイズ | Bouncy Castle | ブロック | |
| XTEA | BC_XTEA | 16- | ブロックサイズ | Bouncy Castle | ブロック | |
| Noekeon | BC_Noekeon | 16- | ブロックサイズ | Bouncy Castle | ブロック | |
| RC6 | BC_RC6 | 1- | ブロックサイズ | Bouncy Castle | ブロック | |
| SM4 | BC_SM4 | 16 | 不要 | Bouncy Castle | ブロック | |
| Dstu7624(128bit) | BC_Dstu7624_128 | 16/32/64 | 不要 | Bouncy Castle | ブロック | |
| Dstu7624(256bit) | BC_Dstu7624_256 | 32/64 | 不要 | Bouncy Castle | ブロック | |
| Dstu7624(512bit) | BC_Dstu7624_512 | 64 | 不要 | Bouncy Castle | ブロック | |
| RC4 | BC_RC4 | 1- | 不要 | Bouncy Castle | ストリーム | |
| HC128 | BC_HC128 | 16 | 不要 | Bouncy Castle | ストリーム | |
| HC256 | BC_HC256 | 16/32 | 10- | Bouncy Castle | ストリーム | |
| Salsa20 | BC_Salsa20 | 16- | 8 | Bouncy Castle | ストリーム | |
| XSalsa20 | BC_XSalsa20 | 32 | 24 | Bouncy Castle | ストリーム | |
| ChaCha | BC_CHACHA | 16/32 | 8 | Bouncy Castle | ストリーム | |
| ChaCha7539 | BC_ChaCha7539 | 32 | 12 | Bouncy Castle | ストリーム | |
| ISAAC | BC_ISAAC | -14 | 不要 | Bouncy Castle | ストリーム | |
| VMPC | BC_VMPC | 1- | 1- | Bouncy Castle | ストリーム | |
| VMPC Ksa3 | BC_VMPCKsa3 | 1- | 1- | Bouncy Castle | ストリーム | |
| ZIPパスワード保護 | PkZip | 12 | 不要 | SharpZipLib |
| 名前 | オプション | IV(byte) | 標準 | Bouncy Castle | 備考 | C:\>StreamRelay.NET.exe -ListCipherMode ------------------------------------------------ Cipher Mode is ECB CBC CFB GOFB OFB OpenPgpCfb CTS SIC CCM EAX GCM OCB KCCM KCTR |
|---|---|---|---|---|---|---|
| ECB | ECB | ブロックサイズ | ○ | × | ||
| 不要 | × | ○ | ||||
| CFB | CFB | ブロックサイズ | ○ | × | ||
| 0-ブロックサイズ | × | ○ | ||||
| CBC | CBC | ブロックサイズ | ○ | × | ||
| 不要、またはブロックサイズ | × | ○ | ||||
| OFB | OFB | ブロックサイズ | ○ | × | ||
| 不要、または任意のサイズ | × | ○ | ||||
| GOFB | GOFB | 不要、または任意のサイズ | × | ○ | BlockSize=8byteのみ GCTR |
|
| OpenPgpCfb | OpenPgpCfb | 不要、または任意のサイズ | × | ○ | ||
| CTS | CTS | × | ○ | × | 疑似ストリーム CTR |
|
| 不要、または任意のサイズ | × | ○ | ||||
| SIC | SIC | 8-16 | × | ○ | CTR/SIC | |
| EAX | EAX | 8-16 | × | ○ | AEAD block cipher mode | |
| CCM | CCM | 不要 | × | ○ | AEAD block cipher mode BlockSize=16byteのみ |
|
| GCM | GCM | 必須(1以上) | × | ○ | AEAD block cipher mode BlockSize=16byteのみ |
|
| OCB | OCB | 不要 | × | ○ | AEAD block cipher mode BlockSize=16byteのみ |
|
| KCTR | KCTR | × | ○ | × | 疑似ストリーム | |
| KCCM | KCCM | 必須(1以上) | ○ | × | AEAD block cipher mode |
| 名前 | 鍵(Byte) | MacSize(Byte) | IV/Nonce(Byte) | BlockSize(Byte) | Nb | 備考 |
|---|---|---|---|---|---|---|
| CCM | - | - | 7-13 | 16 | - | - |
| OCB | 16,24,32 | 8-16 | 1- | 16 | - | 暗号用とハッシュ用の暗号オブジェクトのブロックサイズは共に16である必要がある |
| EAX | 16,24,32 | - | 1- | - | - | - |
| GCM | 16,24,32 | 4-16 | 1- | 16 | - | - |
| KCCM | 16,24,32 | 8-64 | 1- | - | 4,6,8 | Nb は KCCM でのみ必要 |

![]() | ![]() |
| RFC1950 : Zlib | 数バイトのヘッダがあり、先頭4Bit目はON(つまり、0xn[8-f] という1バイト。deflateの場合は、0xn8という1バイト。多分、0x78 が一般的) |
|---|---|
| RFC1951 : deflate | ヘッダなし |
| RFC1952 : GZip | 数バイトのヘッダがあり、先頭2Byteは (0x1f, 0x8b) で固定 |
| gzip[De]Compress | StreamRelay.NET[.x86].exe | GZip |
|---|---|---|
| deflate[De]Compress | StreamRelay.NET[.x86].exe | deflate |
| BC_Zlib[De]Compress | Plugin.BouncyCastle.Crypto.dll | Zlib |
| BC_Deflate[De]Compress | Plugin.BouncyCastle.Crypto.dll | deflate |
| SZ_Zlib[De]Compress | Plugin.CSharpCode.SharpZipLib.dll | Zlib |
| SZ_Deflate[De]Compress | Plugin.CSharpCode.SharpZipLib.dll | deflate |
| SZ_GZipCompress | Plugin.CSharpCode.SharpZipLib.dll | GZip |
| zlib[De]Compress | Plugin.zlib.NET.dll | Zlib |
| ZopfliCompress | Plugin.Zopfli.[x64|x86].dll | ?? |
| ZopfliPngCompress | Plugin.Zopfli.[x64|x86].dll | ?? |
| -[Local|Remote][Request|Response]DeflateCommpress | Deflate |
|---|---|
| -[Local|Remote][Request|Response]ZLIBCommpress | Zlib |
| -[Local|Remote][Request|Response]GZipCommpress | GZip |
| logWrite(String) | ログとして出力します |
|---|---|
| String InputStr | 文字コード指定の場合、ストリームデータを文字列に置換した状態でこれに格納されてる。また、これに格納しておくことで、ストリームへ出力される |
| byte[] InputByteArray | 文字コードを指定していない場合、ストリームデータをバイト列としてこれに格納されている。また、これに格納しておくことで、ストリームへ出力される |
| String BufferStr byte[] BufferByteArray | 一時格納用、次の呼び出しでも保持される。TCPの接続とストリームの方向ごとに独立で保持される |
| Boolean IsSend | このスクリプト呼び出し後に InputByteArray/InputStr のデータを転送したい場合 true をセットする(既定はtrue) |
| String InputStrReverse byte[] InputByteArrayReverse | 返信したい場合、こちらに格納する。文字コードを指定した場合は String 型の変数へ、そうでない場合は、byte配列型の変数へ格納すること |
| Boolean IsSendReverse | このスクリプト呼び出し後に InputByteArrayReverse/InputStrReverse のデータを返信したい場合 true をセットする(既定はfalse) |
| Boolean IsClose | このスクリプト呼び出し後に、コネクションを切断したい場合 true をセットする(既定はfalse) |
| Boolean IsInput | このスクリプトが入力側で呼び出された場合 true。出力側で呼び出された場合 false |
| int count | 呼び出された回数。(「count=0」は接続直後なので、データ(InputByteArray/InputStr)は空のはず) |
| void CountUp() | count をインクリメントする(スクリプト側から使う場面はないだろう) |
| String InputCallerAddress | 入力側の相手のアドレス、またはプログラム、ファイル、標準入力 |
| int InputCallerPort | 入力側の相手のポート番号 |
| String InputMyselfAddress | 入力側の自分自身のアドレス、またはプログラム、ファイル、標準入力 |
| int InputMyselfPort | 入力側の自分自身のポート番号 |
| String OutputCallerAddress | 出力側の相手のアドレス、またはプログラム、ファイル、標準入力 |
| int OutputCallerPort | 出力側の相手のポート番号 |
| String OutputMyselfAddress | 出力側の自分自身のアドレス、またはプログラム、ファイル、標準入力 |
| int OutputMyselfPort | 出力側の自分自身のポート番号 |
| String ErrorStr | スクリプトの実行エラーを格納する |
| void ShowDialog(String) | ダイアログを表示する(CUIなのに、GUIのダイアログが表示されます) |
| void SendMessageWindow(String) | |
| void Speak(String) | 音声を発生させる |
| String SpeakVoiceName | 音声エンジンの名前 |
| int SpeakVoiceRat | 音声の速さ(-100〜100) |
| int SpeakVoiceVolume | 音声の大きさ(0〜100) |
| Object LocalTag | スクリプトのセッションで保持される、Object 型の変数を用意してみた。バッファとして使えると思う |
| void LocalLock() | LocalTag をロックする |
| void LocalUnLock() | LocalTag のロックをはずす |
| String LocalGetDictionary(String) | タグをディクショナリオブジェクトとして用いて、キーの値を取得 |
| void LocalSetDictionary(String key, String value) | タグをディクショナリオブジェクトとして用いて、キーと値をセットする |
| Object GlobalTag | アプリケーション全体でのセッションで保持される、Object 型の変数を用意してみた。バッファとして使えると思う |
| void GlobalLock() | GlobalTag をロックする |
| void GlobalUnLock() | GlobalTag のロックをはずす |
| String GlobalGetDictionary(String) | タグをディクショナリオブジェクトとして用いて、キーの値を取得 |
| void GlobalSetDictionary(String key, String value) | タグをディクショナリオブジェクトとして用いて、キーと値をセットする |
![]() |
| 赤枠で囲まれた部分が存在すればZoneIDが存在。信用できるDLLであれば「ブロックの解除」押下で削除すればプラグインとして読み込み可能となる |
![]() |
C:\>BinHexCUI.exe
BinHexCUI.exe ver 1.0.0.0
created by active@window.goukaku.com
BinHexCUI.exe <<Mode([En|De])>> <<FileName>> |
C:\>SoundChange.exe
SoundChange.exe ver 1.0.0.0
created by active@window.goukaku.com
SoundChange.exe <<FileName>> [<<bit(16)>> <<Hz(8000)>> <<channel(1)>>] |
C:\>IsolatedStorageCUI.exe
IsolatedStorageCUI.exe ver 1.0.0.0
created by active@window.goukaku.com
IsolatedStorageCUI.exe <<Scope>> <<Mode>> [<<FilePath>>]
Scope : MachineStoreForDomain
MachineStoreForAssembly
MachineStoreForApplication
UserStoreForApplication
UserStoreForAssembly
UserStoreForDomain
UserStoreForSite
Mode : List
Read <<FileName>>
Append <<FileName>> |
C:\>DeleteNullPadding.exe
DeleteNullPadding.exe ver 1.0.0.0
created by active@window.goukaku.com
DeleteNullPadding.exe [FileSize|ReferenceFile] <<SourceFileName>> <<TargetFileName>> |
C:\>ZipStreamNET.exe
ZipStreamNET.exe <<mode>> <<ZipFile>> ...
list <<ZipFile>> [-v]
read <<ZipFile>> <<EntryName>>
write <<ZipFile>> <<EntryName>>
ver1.0.0.0
created by active@window.goukaku.com |
| ZIP ファイルへ書き込み(作成) |
|---|
| TYPE ≪入力ファイル≫ | ZipStreamNET.exe write ≪ZIPファイル名≫ ≪エントリ名≫ |
| ZIP ファイルの読み出し |
| ZipStreamNET.exe read ≪ZIPファイル名≫ ≪エントリ名≫ > ≪出力ファイル≫ |
| ZIP ファイル内部のエントリの一覧 |
| ZipStreamNET.exe list ≪ZIPファイル名≫ |