BAT to imitate the digital rain _dos/bat in the hacker Empire

Source: Internet
Author: User
Tags chr goto
:: Digital rain in the hacker empire
@echo%dbg% off
:: Code by Redtek 2006-11-2 CMD@XP
:: Source: http://www.cn-dos.net/forum/viewthread.php?tid=24418
Setlocal enabledelayedexpansion
Mode con cols=80 lines=30
Cls

Set backspace =
Set redtek= ""

Set End=0

: Start

set/a end+=1

Call:calc

set/p=!setspaces! Nul

set/p=% BACKSPACE%<nul

Set/p=%redtek:~1,79%<nul&echo.

Goto:start

: Calc

If%end%==28 (

set/a end=0 & CLS & set/a cols=!random:~0,2!

Echo ... Wind:!cols! ...

If!cols! GTR Set cols=76

If!cols! LSS 2 Set cols=2

Set setspaces=!redtek:~1,%cols%!! random:~0,1!

Goto:eof

)

@echo off
:: Code by JM 2006-11-3 CMD@XP
:: Source: http://www.cn-dos.net/forum/viewthread.php?tid=24418
:: Test.txt contents are: 1234567890abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz~ '!@#%&* () {}[]_+-=\ "'?.,/
:: Temporarily unable to process |<>^
Mode con cols=80
Color 02
for/f%%i in (test.txt) do set str_char=%%i
Set str_blank=
Setlocal enabledelayedexpansion

: Loop
:: Taking characters at random positions
set/a num_char=1%random:~-1%%random:~0,1%-100
Set char=!str_char:~-%num_char%,1!

:: Set random-length spaces
set/a num_blank=1%random:~-1%%random:~0,1%-100
Set blank=!str_blank:~0,%num_blank%!
echo.%blank%%char%
Goto Loop

@echo off
:: Code by having to love 2006-11-3 Cmd@xp
:: Source: http://www.cn-dos.net/forum/viewthread.php?tid=24418
Mode con cols=80
Set a=1234567890abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz~ '!@#%.* () {}[]_+-=\ "'?.,/^& ^^ ^>^<
Set b=
Setlocal enabledelayedexpansion
: A
set/a num=%random%%%92
Set character =!a:~-%num%,1!
set/a c=%random%%%80
Set Space =!b:~-%c%!
echo% space%^% character%
Goto A


@echo off
:: Code by Yfd11 2006-11-3 CMD@XP
:: Source: http://www.cn-dos.net/forum/viewthread.php?tid=24418
Mode con cols=80 lines=30
Set a=1234567890abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz~ '!@#%.* () {}[]_+-=\ "'?.,/^& ^^ ^>^<
Set b=
Setlocal enabledelayedexpansion
: A
set/a num=%random%%%92
Set character =!a:~-%num%,1!
set/a c=%random%%%80
Set Space =!b:~-%c%!
:: Echo. % Space%^% character%

set/a i+=1
REM pointer =i tail pointer =j
set/a j=i-30
Set line%i%=% space%^% character%
FOR/L%%v in (%i%,-1,%j%) Do echo.! line%%v!
::p ing/n 127.1>nul
Goto A

@echo off
:: Code by hxuan999 2006-11-12 CMD@XP
:: Source: http://www.cn-dos.net/forum/viewthread.php?tid=24418
:: Mode con cols=80
Setlocal enabledelayedexpansion
Color 02

Goto BEGIN
Goto:eof

:: Function Mt_rand "a" "B"
: Mt_rand
::(
Set A=%~1
Set b=%~2
set/a _mt_rand= (!random!%% (%b%-%a%)) +%a%
Exit/b 0
::)

: BEGIN
::{--
SET iwidth=80
SET idensity=6
SET stext= "#$& ' () *+,-./0123456789:;<>? @ABCDEFGHIJKLMNOPQRSTUVWXYZ [\]^_ ' abcdefghijklmnopqrstuvwxyz{|} ~
SET stext=!stext: "=!
set/a itext=90-1

FOR/L%%i in (1,1,%iwidth%) do (
Set adown%%i=0
)

: Loop
FOR/L%%i in (1,1,%iwidth%) do (
set/a adown%%i-=1
If!adown%%i! LSS 0 (
Call:mt_rand "0" "%idensity%" &&set aarrow%%i=!_mt_rand!
Call:mt_rand "Ten" "&&set" adown%%i=!_mt_rand!
)
If!aarrow%%i! EQU 1 (
Call:mt_rand "0" "%itext%" && (for%%m in ("!_mt_rand!") Do SET aa=!stext:~%%~m,1!)
Set/p=!aa!<nul
) Else (
set/p= <nul
)
)
Goto Loop
::--}

: Exit
Exit/b 0

@echo off
:: Code by hxuan999 2006-11-12 CMD@XP
:: Source: http://www.cn-dos.net/forum/viewthread.php?tid=24418
Setlocal enabledelayedexpansion
Color 02

FOR/L%%i in (1,1,80) do (
Set down%%i=0
)

: Loop
FOR/L%%j in (1,1,80) do (
set/a down%%j-=1
If!down%%j! LSS 0 (
set/a arrow%%j=!random!%%4
set/a down%%j=!random!%%15+10
)
If "! arrow%%j! "= =" 1 "(
set/a chr=!random!%%2
Set/p=!chr!<nul
) Else (
set/p= <nul
)
)
Goto Loop
Goto:eof

@echo off
:: Code by Newaifi 2006-11-16 CMD@XP
:: Source: http://www.cn-dos.net/forum/viewthread.php?tid=24418
Setlocal enabledelayedexpansion
FOR/L%%i in (1,1,80) do (
Set down%%i=0
)

for/l%%i in (0) do (
Set line=
FOR/L%%j in (1,1,80) do (
set/a down%%j-=1
Call Set x=!down%%j!
If!x! LSS 0 (
set/a arrow%%j=!random!%%6
set/a down%%j=!random!%%15+10
)
Call Set x=! arrow%%j!
If "!x!" = = "1" (
Set Line=!line!1
) Else (set "line=!line!")
)
Call Set/p=!line!<nul
)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.