2016年1月26日 星期二

Batch file - Save current IP to a file

@ECHO off
for /f "delims=: tokens=2" %%a in ('ipconfig ^| findstr /R /C:"IPv4 Address"') do (set tempip=%%a)

set tempip=%tempip: =%

echo %tempip% > IP.txt

Python notes: Calculate delay time by WinDBG log

用WinDBG開Event Timestamps可以產生下面格式的log: Fri Sep 21 18:43:50.946 2018 (UTC + 8:00): @#$#^$@#$^ 以下python code用來找出兩個指定log中的時間差