qshinoの日記

Powershell関係と徒然なこと

2017-04-01から1ヶ月間の記事一覧

TCPconnection by Powershell

TCP by Powershell 手順 new tcpclient stream to reader check .Connected read(buffer,0,size) Write $tcpConnection = New-Object System.Net.Sockets.TcpClient($FTPServer, $FTPPort) $tcpStream = $tcpConnection.GetStream() $reader = New-Object Sy…

MTU/MSS

パケッサイズ MTU/MSS MTU: Maximum Transmission Unit MSS: Maximum Segment Size Max. Ethernet Frame Size: 1518 IP MTU : 1500 MSS : Header/Trailer Size List Ethernet: 14 +4 = 18 PPPoE header : 6 PPP : 2 IP : 20 TCP: 20 UDP : 8 IPsec esp tunne…

git 取り消し

git

git 取り消し ここでの取り消し対象は下記のもの index : addしたもの commit push index git reset commit git revert コミットハッシュ push git revert コミットハッシュ git push merge 直前マージ git reset –hard HEAD^

LinuxからWindows制御

LinuxからWindows制御 winexeが使える。 コンピュータ名 hunnyの場合。 winexe -U hunny/Administrator%poi //192.168.1.1 "echo Oha-" 開放が必要なポート 135/tcp(RPCエンドポイント・マッパー) 445/tcp(ダイレクト・ホスティングSMB) 1025~65535/tcp…

WPF複数ページ

wpf

WPF複数ページ 題名通り、WPFでの複数ページ対応方法。 子ウインドウ NavigationWindow TabControl 用途に応じて使い分ける。 初心者向けの初期設定などの一方通行型としたい場合は、NavigationWindow。バックも可能だが、一本道だとユーザーが次に何をする…

非同期実行 by powershell

非同期実行 by powershell RunSpace Start-Job Start-Process AppDomain 独立アプリ起動 System.Diagnostics.Process 非同期中、標準入出力を制御できるもの。 Start-Job : receive-job Start-Process: ファイル指定 Process: Stream 終了値を取得できるもの…

SSH by Powershell

ssh by powershell ssh.net + PowerShell opensshも出ているが、PowerShellで使うにはモジュールの方が便利かもしれない。 参考 http://www.powershelladmin.com/wiki/SSH_from_PowerShell_using_the_SSH.NET_library

ポートスキャンサービス

ポートスキャンサービス 外部からポートスキャンをしてくれるサービス。 Sields Up https://www.grc.com/x/ne.dll?bh0bkyd2 参考 http://www.atmarkit.co.jp/fsecurity/rensai/securitytips/006portscan.html

delegate by Powershell

サンプル [System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true } 参考 http://www.nivot.org/blog/post/2009/07/18/PowerShell20RCWorkingWithNETCallbacksPart1Synchronous

AppDomain再び

AppDomain再び PowerShellによるAppDomain制御。 ちょっと古い記事。10年前のもの。 by oising 2007/12/07 As knowledge of PowerShell increases for those new to .NET, there comes a point when people start to notice some shortcomings of the Assemb…

Windows7 整列

PC

Windows7ウインドウ整列 Windows7でウインドウを整列する方法。 タスクバーで右クリック。 ウインドウを上下に並べて表示 または、左右に並べて表示 戻す時 タスクバーで、元に戻す。 結構便利。 参考 https://www.microsoft.com/ja-jp/atlife/tips/archive/…

Excell プルダウンリスト

PC

Excel プルダウンリスト データタブ => データの入力規則 => データの入力規則 => 設定タブ => 全ての値 => リスト => コンマ区切りで入力 — (A) バリエーション (A) の部分 シート範囲指定 名前で指定。 Indirect() 名前の設定方法 数式 => 名前の定義 => …