![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-08-07 01:53 |
48,040 topics / 350,125 posts / today 1 new / 48,252 members |
| DOS批处理 & 脚本技术(批处理室) » How to randomize from 0 to 255 |
| Printable Version 698 / 4 |
| Floor1 gnahshining | Posted 2007-12-26 21:55 |
| 初级用户 Posts 14 Credits 40 | |
|
An IP range, how to randomize from 0 to 255
Display a random IP range |
|
| Floor2 nanhui112 | Posted 2007-12-26 21:59 |
| 初级用户 Posts 59 Credits 127 | |
|
@echo off
set "a=%random%%%226" ping 192.168.132.%a% Is that what you mean? |
|
| Floor3 knoppix7 | Posted 2007-12-27 16:45 |
| 银牌会员 Posts 634 Credits 1,287 From cmd.exe | |
|
The poster above... should be %%256, right
|
|
| Floor4 nanhui112 | Posted 2007-12-27 23:02 |
| 初级用户 Posts 59 Credits 127 | |
|
Sorry, typo. Thanks for pointing it out!
|
|
| Floor5 nanhui112 | Posted 2007-12-28 12:53 |
| 初级用户 Posts 59 Credits 127 | |
|
set /a "a=%random%%%256" randomly displays 0-255
set /a "a=%random%%%255+1" randomly displays 1-255 What I wrote above was wrong sorry about that I'm just learning too... |
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |