發表文章

目前顯示的是有「開發Tool」標籤的文章

ARP

圖片
Windows ARP command : C:\Documents and Settings\Alan>arp /? Displays and modifies the IP-to-Physical address translation tables used by address resolution protocol (ARP). ARP -s inet_addr eth_addr [if_addr] ARP -d inet_addr [if_addr] ARP -a [inet_addr] [-N if_addr] -a Displays current ARP entries by interrogating the current protocol data. If inet_addr is specified, the IP and Physical addresses for only the specified computer are displayed. If more than one network interface uses ARP, entries for each ARP table are displayed. -g Same as -a. inet_addr Specifies an internet address. -N if_addr Displays the ARP entries for the network interface specified by if_addr. -d Deletes the host specified by inet_addr. inet_addr may be wildcarded with * to delete all hosts. -s Adds the host and associates the Internet address inet_addr with the Physical...

Blogger 貼html的利器

圖片
http://dob.tnc.edu.tw/authorHD/74/editor.htm

DOS重新導向運算子

現在windows的時代了,很多基本的東西windows說明裡都有,搜尋"重新導向"... 摘錄windows說明如下: 使用指令重新導向運算子您可以使用重新導向運算子,從預設位置將指令輸入和輸出資料流重新導向至不同位置。輸入或輸出資料流位置是指控制碼。 下表列出可用來重新導向指令輸入和輸出資料流的運算子。 重新導向運算子 描述 > 對檔案或裝置 (例如印表機) 而不是 [命令提示字元] 視窗寫入指令輸出。 > 附加指令輸出到檔案結尾,而不刪除檔案中已有的資訊。 >& 將一個控制碼的輸出寫至另一個控制碼的輸入。 重新導向輸出運算子是一 (1)。鍵入 運算子之後,您必須指定要讀取或寫入資料的位置。您可以指定檔案名稱或另一個現存的控制碼。 若要指定重新導向現有的控制碼,請使用 (&) 字元後面加上要重新導向的控制碼 (亦即,&handle#)。例如,下列指令將控制碼 2 (亦即,STDERR) 重新導向為控制碼 1 ( 亦即,STDOUT): 1 c:\file.txt 2>&1 重複一個控制碼時,則會重複此控制碼原始出現時的所有特性。例如,若一個控制碼有唯寫存取權,那麼該控制碼的全部複本皆會具有唯寫存取權。您無法將含有唯讀存取權的控制碼複製到含有唯寫存取權的控制碼。 重新導向指令輸入 ( ) 幾乎全部指令都將輸出傳送到 [命令提示字元] 視窗。即使將輸出傳送到磁碟機或印表機的指令,也會在 [命令提示字元] 視窗顯示訊息和提示。 若要從 [命令提示字元] 視窗將指令輸出重新導向到檔案或裝置,請使用 > 運算子。您可以使用此運算子搭配大部份指令。例如,重新導向 dir 輸出到 Dirlist.txt: dir>dirlist.txt 若 Dirlist.txt 不存在,那麼 Cmd.exe 會建立它。如果 Dirlist.txt 存在,則 Cmd.exe 會用 dir 指令的輸出以取代檔案中的資訊。 若要執行 netsh routing dump 指令,然後將指令輸出傳送到 Route.cfg,請鍵入: netsh routing dump>c:\route.cfg > 運算子會使用唯寫存取權以開啟指定的檔案。因此,當您使用此運算子時無法讀取該檔案。例如,若使用重新導向...

FTP List , DownLoad , Upload Test by CURL

[指定 某個 IP 為 Source IP. 結果輸出 檔案 ?xresult.log] curl --max-time 30 -w \r\nAVG_SPEED:%{speed_download}\r\n -u alan:pass "ftp://ftpserver/dl.bin" -O > Rxresult.log 2 Txresult.log 2 ftplist.log 2 ftplist.log 2 P.S:目錄最後一定要加上 "/"

One line command to check file in ftp site is exist or not or filesize.

C:\curl>curl ftp://ftpserver/path/manual.txt -u alan:pass --list-only --head Last-Modified: Thu, 11 Dec 2008 15:57:58 GMT Content-Length: 111054 Accept-ranges: bytes C:\curl>curl ftp://ftpserver/path/manual_1.txt -u alan:pass --list-only --head curl: (19) Given file does not exist Remember , If you want to output the screen into a file for other reading check purpose by other application . please alway reference output.log 2>&1 C:\curl>curl ftp://ftpserver/path/manual_1.txt -u alan:pass --list-only --head > output.log 2>&1 C:\curl>curl ftp://ftpserver/path/manual.txt -u alan:pass --list-only --head > output.log 2>&1

透過batch file 就可以完成delay function

只要在batch file 裡面加入 ping 1.0.0.0 -n 1 -w 100 > Nul 就可達到 delay 100ms 功能 ping /? Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS] [-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] target_name Options: -t Ping the specified host until stopped. To see statistics and continue - type Control-Break; To stop - type Control-C. -a Resolve addresses to hostnames. -n count Number of echo requests to send. -l size Send buffer size. -f Set Don't Fragment flag in packet. -i TTL Time To Live. -v TOS Type Of Service. -r count Record route for count hops. -s count Timestamp for count hops. -j host-list Loose source route along host-list. -k host-list Strict source route along host-list. -w timeout Timeout in milliseconds to wait for each reply.

透過rasdial 實現連接ADSL

透過dos command 來連線. rasdial.exe /? 使用方式: rasdial 項目名稱 [使用者名稱 [密碼|*]] [/DOMAIN:網域] [/PHONE:電話號碼] [/CALLBACK:回撥號碼] [/PHONEBOOK:電話簿檔案] [/PREFIXSUFFIX] rasdial [項目名稱] /DISCONNECT rasdial 命令已成功完成。 dos下撥號: rasdial"空格" "你的撥號連接的名稱" "空格" "你的撥號連接的密碼" dos下斷線: rasdial"空格" "/disconnect"

使用netsh 快速修改網卡IP

圖片
只要建立簡單批次檔 即可快速修改網卡IP 先將網卡名稱設定為nic1 example 1: 快速將網卡IP 改為192.168.1.1 mask 255.255.255.255 開啟記事本輸入如下,另存新檔為ip.bat netsh interface ip set address nic1 static 192.168.1.1 255.255.255.0 example 2: 快速將網卡改為dhcp client 開啟記事本輸入如下,另存新檔為dhcp netsh interface ip set address nic1 dhcp

網路傳輸工具 curl

可透過command line 來達到傳輸檔案. 透過http 續傳一個檔案 : curl -O "-C -" "http://ardownload.adobe.com/pub/adobe/reader/pase/3.x/zh_tw/psa30se_a708_DLM_zh_tw.exe" 登錄網頁 get : curl -d "userid=admin&passwd=&Submit=LOGIN" http://192.168.2.1/index.htm curl "http://192.168.2.1/index.htm?userid=admin&passwd=&Submit=LOGIN" 透過網頁上傳檔案: curl -F "vxworks_new=@C:\curl_715_5\zz-img.bin" http://192.168.2.1/upgrade_firm_local 登錄網頁 get : curl -d "userid=admin&passwd=&Submit=LOGIN" http://192.168.2.1/index.htm 指定透過某一張網卡出去: curl --interface 192.168.1.123 http://tw.yahoo.com 查看FTP檔案: curl -l "ftp://127.0.0.1" 抓檔案另存新檔: curl -o "test" "http://ardownload.adobe.com/pub/adobe/reader/pase/3.x/zh_tw/psa30se_a708_DLM_zh_tw.exe" 抓成檔案: curl -O "http://ardownload.adobe.com/pub/adobe/reader/pase/3.x/zh_tw/psa30se_a708_DLM_zh_tw.exe" 分割檔案抓取: curl -O -r 0-1000 "http://ardownload.adobe.com/pub/adobe/reader/pase...

網路速度測試工具 Iperf

使用client server 架構可透過TCP and UDP 來測試網路速度. 但須透過兩台電腦來測試 dos mode ,可透過外部程式來執行. example: server-> iperf -s -i 1 -w 120k client-> iperf -c 192.168.1.11 -i 1 -w 120k -t 3600 http://www.noc.ucf.edu/Tools/Iperf/ What is Iperf? While tools to measure network performance, such as ttcp, exist, most are very old and have confusing options. Iperf was developed as a modern alternative for measuring TCP and UDP bandwidth performance. Iperf is a tool to measure maximum TCP bandwidth, allowing the tuning of various parameters and UDP characteristics. Iperf reports bandwidth, delay jitter, datagram loss. Usage: iperf [-s|-c host] [options] iperf [-h|--help] [-v|--version] Client/Server: -f, --format [kmKM] format to report: Kbits, Mbits, KBytes, MBytes -i, --interval # seconds between periodic bandwidth reports -l, --len #[KM] length of buffer to read or write (default 8 KB) -m, --print_mss print TCP maximum segment size (MTU - TCP/IP header) -o, --output o...