China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-31 12:55
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Original] Code for Batch Input Password and Displaying * - Batch Application Version View 1,890 Replies 7
Original Poster Posted 2007-12-16 17:22 ·  中国 北京 鹏博士BGP
银牌会员
★★★
Credits 2,098
Posts 566
Joined 2007-09-11 07:27
18-year member
UID 97070
Gender Male
Status Offline
```@echo off&setlocal&pushd %tmp% %Hide password by displaying * {s11ss 2007-12-16}%
<"%~f0" more +10|debug>nul&move t "t.com"
echo The length of the password should not bigger than 32!&echo Press any key to continue...&pause>nul&cls
t
echo exit|cmd /kprompt d20:0 20$_q$_|debug>t
for /f "skip=2 tokens=*" %%a in (t) do set t=%%a&call set t=%%t:~61,16%%&call set s=%%s%%%%t%%
for /f "skip=2 tokens=2" %%a in (t) do set/a l=0x%%a&goto :t
:t
cls&echo The password is:&call echo.%%s:~1,%l%%%
del t t.com&popd&echo.&echo Press any key to exit...&pause>nul&goto :eof
e0100 BB 00 B8 8E C3 BF 00 00 BE 00 00 B4 00 CD 16 80
e0110 FC 0E 75 0E 83 FE 00 74 F2 4E 4F 4F 26 C6 05 20
e0120 EB E9 80 FC 1C 74 1C 3C 20 72 E0 26 C6 05 2A 8C
e0130 C2 BB 00 00 8E C3 26 88 84 01 02 8E C2 83 C7 02
e0140 46 EB C8 BB 00 00 8E C3 8B C6 26 A2 00 02 B8 00
e0150 4C CD 21
rcx
53
n t
w
q
```
Recent Ratings for This Post ( 4 in total) Click for details
RaterScoreTime
abcd +5 2007-12-16 19:25
knoppix7 +4 2007-12-17 18:05
huzixuan +8 2007-12-19 18:17
radem +6 2009-02-13 19:05
Floor 2 Posted 2007-12-16 23:27 ·  中国 广东 广州 教育网
初级用户
★★
Credits 163
Posts 86
Joined 2007-09-05 03:02
18-year member
UID 96588
Gender Male
Status Offline
Assembly?
Can you explain it?
Floor 3 Posted 2007-12-17 09:30 ·  中国 北京 鹏博士BGP
银牌会员
★★★
Credits 2,098
Posts 566
Joined 2007-09-11 07:27
18-year member
UID 97070
Gender Male
Status Offline
Originally posted by penghuahui at 2007-12-16 11:27 PM:
Assembly?
Can you explain it?

COM file:
For visible characters (including spaces) entered by pressing keys, display an asterisk (*) and simultaneously write the character to the memory address space starting at 0:201h; when the backspace key is pressed, only replace the previous asterisk with a space, and this space may be overwritten by a newly entered visible character next time (if there is no asterisk before pressing the backspace key, do nothing); when the enter key is pressed, end the input process and write the length of the string to 0:200h.

After the batch processing executes the COM file, use debug to write the data from 0:200h to 0:220h to a file, obtain the original input data according to the length of the string and display it.

[ Last edited by s11ss on 2007-12-17 at 09:31 AM ]
Floor 4 Posted 2007-12-17 13:12 ·  中国 四川 成都 电信
初级用户
Credits 80
Posts 31
Joined 2005-11-28 00:29
20-year member
UID 46066
Status Offline
How to use it, please boss explain it
Floor 5 Posted 2007-12-17 17:28 ·  中国 辽宁 大连 联通
银牌会员
★★★
Credits 2,098
Posts 566
Joined 2007-09-11 07:27
18-year member
UID 97070
Gender Male
Status Offline
Floor 6 Posted 2007-12-18 21:51 ·  中国 甘肃 定西 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
Floor 7 Posted 2009-02-12 21:22 ·  中国 甘肃 张掖 电信
初级用户
Credits 47
Posts 27
Joined 2008-06-23 22:44
18-year member
UID 120749
Gender Male
From 甘肃. 武威
Status Offline
Not quite understand, bookmark for later use! Study it slowly when I get started! Thanks to the LZ!
好好学习,
天天向上。
Floor 8 Posted 2009-02-13 15:12 ·  美国 华盛顿州 金 雷德蒙德 Microsoft
初级用户
★★
Credits 100
Posts 93
Joined 2009-01-14 15:04
17-year member
UID 136661
Gender Male
From 湖南
Status Offline
e0100 BB 00 B8 8E C3 BF 00 00 BE 00 00 B4 00 CD 16 80
e0110 FC 0E 75 0E 83 FE 00 74 F2 4E 4F 4F 26 C6 05 20
e0120 EB E9 80 FC 1C 74 1C 3C 20 72 E0 26 C6 05 2A 8C
e0130 C2 BB 00 00 8E C3 26 88 84 01 02 8E C2 83 C7 02
e0140 46 EB C8 BB 00 00 8E C3 8B C6 26 A2 00 02 B8 00
e0150 4C CD 21
Can you ask how it was obtained?
Forum Jump: