设为首页 收藏本站
查看: 766|回复: 0

[经验分享] Unix-like utilities for Windows

[复制链接]

尚未签到

发表于 2016-5-20 08:14:07 | 显示全部楼层 |阅读模式
  原文:http://www.geocities.com/lc_castro/winnt.htm

  
  
<!--  following code added by server. PLEASE REMOVE -->
<!--  preceding code added by server. PLEASE REMOVE -->



http://www.geocities.com/lc_castro/images/new.gif
Unix-like utilities for Windows

  After almost 5 years, I rewrote some of these utilities. I received emails from many
people that found them useful, and I'm glad they took the time to write me!.

  Some of the programs were updated to work with bigger capacity disks, and other were
just fixed for some security issues I found.

  The source code was cleaned and now compiles under Microsoft Visual Studio 2005
(the previous version was written on Visual Studio 6.0)

  These are some Unix-like (they are similar to some tools found in the Un*x
world) utilities that I wrote. They run in an NT/2000/XP/2003 operating systems. These tools
are command-line based.

  I have received several requests for it, so the source code is included
now. The tools are being distributed under the GNU General Public License
(GNU GPL) terms.

  You can find all these tools packed on a single file:
LCUtils.zip
.

  Note: The DOS and 16-bit Windows version are not longer supported, and I removed them
from this site
  Items with the NEW!
logo have new features.



Filename

Description

Output sample
mt.exehttp://www.geocities.com/lc_castro/images/new.gif

12-aug-2008
This is a port from the Unix "mt" command. It gives you some
control on a Tape device. It implements commands to rewind the tape, set the
block size, forward or back a specified count of blocks, erase the tape,
eject the tape, etc. It has only been tested with a DAT drive.

D:\>mt
mt - Version 1.0.1
Copyright (C) 2000-2008, Luis C. Castro Skertchly (lc_castro@yahoo.com)
Opening device \\.\TAPE0... Ok
Drive parameters:
ECC = FALSE
Compression = TRUE
DataPadding = FALSE
ReportSetMarks = TRUE
Default Block Size = 16384
Minimum Block Size = 1
Maximum Block Size = 131072
Maximum Partition Count = 2
EOT Warning Zone Size = 0
Tape parameters:
Capacity: 2000129024
Block Size: 0
Partitions: 1
Write protected: No
tapecopy.exehttp://www.geocities.com/lc_castro/images/new.gif

12-aug-2008
Makes a raw copy of a tape device. It support
writing/reading data from/to standard input/output like many Unix tools. It
can be used with the GNU tar tools to write or read tar tapes from Unix
boxes in a NT box.  Now completly in english!
(The previous version was in spanish, but
as many users of these tools are international, I decided to use english).



D:\>tapecopy
tapecopy - Version 1.5
Copyright (C) 2000-2008, Luis C. Castro Skertchly
Usage: tapecopy [-v] [-b block] [-r] -x|c [-d devname] [-f filename]
-v : Verbose
-b : Specify tape block size in bytes (0 = autodetect)
-r : Rewind tape before start
-x : Extract data from tape
-c : Copy data to tape
-d : Specify the tape device name (default = TAPE0)
-f : filename from/to where data will be copied
Valid device names are:
TAPE0
TAPE1
df.exe

26-jul-2007
Shows the free space on disk, also it shows: cluster count, cluster
size, free clusters.

D:\>df
df - Version 2.0
Copyright (C) 2000-2007, Luis C. Castro Skertchly
Drive D:
8 Sectors per cluster
512 Bytes per sector
23,039,218 Clusters
14,150,108 Free Clusters
92,156,872 KB total disk space
56,600,432 KB free

kill.exe

12-feb-2003
Terminates a process using its process ID (PID). The PID can be obtained
from the task manager process list or using the "ps.exe" or "psnt.exe"
utilities.
n/a
logoff.exe

12-feb-2003
Terminates a Windows session and optionally reboots or power down the
system.
n/a
gboot32.exe

26-jul-2007
Gets the boot record of a floppy disk or partition and writes it on a
file. Very useful to create entries at the BOOT.INI file.  


D:\>gboot32 C: BOOT.DAT
Reading boot sector from \\.\C:...
writing bootprogram BOOT.DAT...

mkboot32.exe
It creates a boot record on a floppy disk or disk partition based on a
boot-strap code in a file. Very useful to create MS-DOS boot disks from
Windows NT. In order to do that, first get a bootable DOS disk and run
"getboot.exe" to get the boot record. Then you can use "mkboot"
to write that boot record in a different disk.  


D:\>mkboot32 boot.dat A
Reading BPB from \\.\A:...
Reading bootprogram boot.dat...
Writing new boot sector on \\.\A:...

msgbox.exe

12-feb-2003
Displays a Windows Message Box and waits for the user to click the OK
button.
http://www.geocities.com/lc_castro/msgbox.jpg
ps.exe

12-feb-2003
This tool is similar to the "ps" command found on every
Unix system. It shows a list of the running processes, its Process ID (PID),
Parent Process ID (PPID), number of threads running (THR), process priority (PR),
and (when possible) the full path to the executable image.

D:\Users\Luis\VC\UTIL>ps
PS - Process list
(C) 2001, Luis C. Castro Skertchly
PID  PPID  THR PR NAME
0    0   2   0 [System Process]
4    0  80   8 System
556    4   3  11 smss.exe
624  556  13  13 csrss.exe
648  556  20  13 winlogon.exe
696  648  15   9 services.exe
708  648  18   9 lsass.exe
860  696  20   8 svchost.exe
960  696  10   8 svchost.exe
1048  696   5   8 svchost.exe
1128  696  62   8 svchost.exe
1144  696   4   8 svchost.exe
1216  696   7   8 svchost.exe
1276  696  12   8 spoolsv.exe
1392  696   0   8 avp.exe
1424  696  16   8 inetinfo.exe
1440  696   5   8 mdm.exe
1468  696   3   8 nvsvc32.exe
1512  696   4   8 retrorun.exe
1648  696   6   8 svchost.exe
1676  696   6   8 symlcsvc.exe
1056 1008  14   8 C:\WINDOWS\Explorer.EXE
2192 1056   0   8 avp.exe
2244 1056   1   8 C:\WINDOWS\system32\ctfmon.exe
2264 1056   2   8 C:\Program Files\HDD Thermometer\HDD Thermometer.exe
2296 1056   3   8 C:\Program Files\SpeedFan\speedfan.exe
2868 3292   1   8 C:\WINDOWS\system32\notepad.exe
3036 1056  13   8 C:\PROGRA~1\MOZILL~1\FIREFOX.EXE
500 3292   1   8 D:\Users\Luis\VC\UTIL\ps.exe
rcopy.exe

26-jul-2007
Raw copy tool. It copies raw data from/to a device, just as if it were
just another file. It works with floppy disks, CD-ROM (reading only) and tape devices.

For Unix users, it is very similar to do:
dd if=/dev/rfloppy of=filename.dat

D:\>rcopy \\.\CDROM1 cdimage.iso
rcopy - Version 1.2
Copyright (C) 2000-2007, Luis C. Castro Skertchly
WARNING: Can't get source file size
Copying \\.\CDROM1 to disk.iso (block size = 1024 bytes)
3 MB copied...

getreg.exe

12-feb-2003
Gets a Registry key value from the command-line interface. Useful when
writing batch scripts.

D:\>getreg LM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CSDVersion
Service Pack 5

setreg.exe

12-feb-2003
Sets a Registry key value from the command-line interface. Useful when
writing batch scripts. To change the default IE download directory run:

D:\>setreg CU "Software\Microsoft\Internet Explorer" "Download Directory" D:\DOWN
which.exe

27-jul-2007
Searches an executable file in the PATH and prints its current location.

D:\>which dnsadmin
D:\WINNT\system32\dnsadmin.exe
wmem.exe

26-jul-2007
Displays statics about memory usage, processor type and speed and
Windows directories location.

D:\>wmem
37% Memory utilization
Total physical memory:        1,046,252 Kb
Phys. memory available:         653,728 Kb
Page file size:               2,129,864 Kb
Available in page file:       1,822,220 Kb
Virtual Memory size:          2,097,024 Kb
Free Virtual Memory:          2,084,124 Kb
Page size:                        4,096 bytes
Minimum Appl. Address:       0x00010000
Maximum Appl. Address:       0x7ffeffff
Number of processors:                 2
Allocation Granularity:          65,536 bytes
Processor: Intel  2593 MHz Pentium Family 15 Model 2 Stepping 9
C:\WINDOWS is Windows directory
C:\WINDOWS\system32 is System directory

wver.exe

26-may-2003
Displays Windows version

D:\>wver
Microsoft Windows NT 4.0 (Build 1381) Service Pack 5
D:\>wver
Microsoft Windows XP Professional (Build 2600) Service Pack 2


  
Last modification: August 12, 2008

Previous modification: September 23, 2007

Previous modification: December 13, 2002

Luis Carlos Castro Skertchly
lc_castro@yahoo.com




<!--  text below generated by server. PLEASE REMOVE -->  
<script src="http://us.i1.yimg.com/us.yimg.com/i/mc/mc.js"></script><script src="http://us.js2.yimg.com/us.js.yimg.com/lib/smb/js/hosting/cp/js_source/geov2_001.js"></script><script>geovisit();</script>http://visit.geocities.com/visit.gif?&r=http%3A//www.google.com/search%3Fhl%3Den%26client%3Dfirefox-a%26rls%3Dorg.mozilla%253Azh-CN%253Aofficial%26hs%3DIYR%26newwindow%3D1%26q%3Dwindows+Kill%25E3%2580%2582exe%26aq%3Df%26oq%3D%26aqi%3D&b=Netscape%205.0%20%28Windows%3B%20zh-CN%29&s=1280x1024&o=Win32&c=32&j=true&v=1.2

<noscript>&lt;img src="http://visit.geocities.yahoo.com/visit.gif?us1255060102" alt="setstats" border="0" width="1" height="1"&gt;</noscript>  
http://geo.yahoo.com/serv?s=76001544&t=1255060102&f=us-w8

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-219322-1-1.html 上篇帖子: Advances in Windows Shellcode 下篇帖子: 破解windows 登录密码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表