DJIOAN
16-06-2020, 23:48
здравствуйте. помогите пожалуйста с моей идеей розыгрыша. Есть ПК на котором стоит пароль администратора (я его знаю). Я состряпал из кусков один vbs который создает мне нужный bat файл в папке Автозагрузка. Вроде бы все сделал, но после создания bat файла он не работает, сравниваю с исходным, все вроде один в один. Исходный bat работает, выведенный из vbs не хочет, может ошибки в синтаксисе, либо есть предположение что что-то связано с кодировкой?!
Вот файл@echo off
echo.
chcp 1251 >nul
setlocal enableextensions enabledelayedexpansion
color 1a
title копирование copy your data .....
mode con: cols=28 lines=30
Echo.
cls
::Эмулируем голос (асинхронный запуск)
echo CreateObject("SAPI.SpVoice").Speak"Operation started... your file, sending, in United States of America, please wait,,,, ">"%temp%\speak.vbs"
cscript //nologo "%temp%\speak.vbs"
del "%temp%\speak.vbs"
@echo off
:1
chcp 1251>nul
echo copy secret information ... (kopirovanie dannix...)
set /a a=%a%+1
set /a nr=%nr%+2
set /a B=(%nr%+1)/5
echo.
echo ============ %B% %% ==========
echo ============================
if %a% LSS 3 echo.
if %a%==3 echo U
if %a%==4 echo UU
if %a%==5 echo UUU
if %a%==6 echo UUU
if %a%==7 echo UUU
if %a%==8 echo UUU
if %a%==9 echo UUU
if %a%==10 echo UUU
if %a%==11 echo UUU
if %a%==12 echo UUU
if %a%==13 echo UUU
if %a%==14 echo UUU
if %a%==15 echo UUU
if %a%==16 echo UUU
if %a%==17 echo UUU
if %a%==18 echo UUU
if %a%==19 echo UUU
if %a%==20 echo UUU
if %a%==21 echo UUU
if %a%==22 echo UUU
if %a%==23 echo UUU
if %a%==24 echo UUU
if %a%==25 echo UU
if %a%==26 echo U
echo ============================
if %a% GTR 26 set /a a=0
ping localhost -n 1 >nul
ping localhost -n 1 >nul
if %b%==100 goto final
if %b% GTR 100 goto final
echo.
echo. $$$$$$$$$$$$$$$$
echo. 4$$$$$$$$$$$$$$$$F
echo. 4$$$$$$$$$$$$$$$$F
echo. $$$$" "$$$$" "$$$$
echo. ?$F 4$$F 4$"
echo. $$___$$$$___$P
echo. 4$$$$$"^$$$$$%
echo. "$$$ee$$$"
echo. $$$$F4
echo. 4$$c $....$ ё$$r
echo. ^$$$b $$$$ e$$$"
echo. d$$$$$e z$$$$$b
echo.4$$$*$$$$$c $$$$$*$$$r
echo. "" ^*$$$be$$$*" ^"
echo. "$$$$"
echo. d$$P$$$b
echo. d$$P $$$b
echo. ed$$$" "$$$be
echo. $$$$$$P $$$$$$
echo.4$$$$$P $$$$$$"
echo. "*$$$" $$P
echo. "" ""
cls
goto 1
:final
chcp 1251>nul
echo.
echo kopirovanie dannix...
echo ^>\thanks for waiting.
echo.
echo.
Ping -n 2 127.0.0.1>nul
echo CreateObject("SAPI.SpVoice").Speak"Operation complited..., please wait, thank you friend, good by ">"%temp%\speak.vbs"
cscript //nologo "%temp%\speak.vbs"
del "%temp%\speak.vbs"
Del %0 /q
это рабочий , а вот vbs который выводит но файл не рабочий Set oShell = WScript.CreateObject("WScript.Shell")
set objFSOSheduler = CreateObject("Scripting.FileSystemObject")
set text = objFSOSheduler.CreateTextFile("F:\Рабочий стол\ммм.bat", 0, true)
text.writeLine ("@echo off")
text.WriteLine ("echo.")
text.WriteLine ("chcp 1251 >nul")
text.WriteLine ("setlocal enableextensions enabledelayedexpansion")
text.WriteLine ("color 1a")
text.WriteLine ("title копирование copy your data .....")
text.WriteLine ("mode con: cols=27 lines=30")
text.WriteLine ("Echo.")
text.WriteLine ("")
text.WriteLine ("cls")
text.WriteLine ("::Эмулируем голос (асинхронный запуск)")
text.WriteLine ("echo CreateObject(""SAPI.SpVoice"").Speak""Operation started... your file, sending, in United States of America, please wait,,,, "">""%temp%\speak.vbs""")
text.WriteLine ("cscript //nologo ""%temp%\speak.vbs""")
text.WriteLine ("del ""%temp%\speak.vbs""")
text.WriteLine ("")
text.WriteLine ("@echo off")
text.WriteLine (":1")
text.WriteLine ("chcp 1251>nul")
text.WriteLine ("echo copy secret information ... (kopirovanie dannix...)")
text.WriteLine ("set /a a=%a%+1")
text.WriteLine ("set /a nr=%nr%+2")
text.WriteLine ("set /a B=(%nr%+1)/5")
text.WriteLine ("echo.")
text.WriteLine ("echo ============ %B% %% ==========")
text.WriteLine ("echo ============================")
text.WriteLine ("if %a% LSS 3 echo.")
text.WriteLine ("if %a%==3 echo U")
text.WriteLine ("if %a%==4 echo UU")
text.WriteLine ("if %a%==5 echo UUU")
text.WriteLine ("if %a%==6 echo UUU")
text.WriteLine ("if %a%==7 echo UUU")
text.WriteLine ("if %a%==8 echo UUU")
text.WriteLine ("if %a%==9 echo UUU")
text.WriteLine ("if %a%==10 echo UUU")
text.WriteLine ("if %a%==11 echo UUU")
text.WriteLine ("if %a%==12 echo UUU")
text.WriteLine ("if %a%==13 echo UUU")
text.WriteLine ("if %a%==14 echo UUU")
text.WriteLine ("if %a%==15 echo UUU")
text.WriteLine ("if %a%==16 echo UUU")
text.WriteLine ("if %a%==17 echo UUU")
text.WriteLine ("if %a%==18 echo UUU")
text.WriteLine ("if %a%==19 echo UUU")
text.WriteLine ("if %a%==20 echo UUU")
text.WriteLine ("if %a%==21 echo UUU")
text.WriteLine ("if %a%==22 echo UUU")
text.WriteLine ("if %a%==23 echo UUU")
text.WriteLine ("if %a%==24 echo UUU")
text.WriteLine ("if %a%==25 echo UU")
text.WriteLine ("if %a%==26 echo U")
text.WriteLine ("echo ============================")
text.WriteLine ("if %a% GTR 26 set /a a=0")
text.WriteLine ("ping localhost -n 1 >nul")
text.WriteLine ("ping localhost -n 1 >nul")
text.WriteLine ("if %b%==100 goto final")
text.WriteLine ("if %b% GTR 100 goto final")
text.WriteLine ("echo.")
text.WriteLine ("echo. $$$$$$$$$$$$$$$$")
text.WriteLine ("echo. 4$$$$$$$$$$$$$$$$F")
text.WriteLine ("echo. 4$$$$$$$$$$$$$$$$F")
text.WriteLine ("echo. $$$$"" ""$$$$"" ""$$$$")
text.WriteLine ("echo. ?$F 4$$F 4$""")
text.WriteLine ("echo. $$___$$$$___$P")
text.WriteLine ("echo. 4$$$$$""^$$$$$%")
text.WriteLine ("echo. ""$$$ee$$$""")
text.WriteLine ("echo. $$$$F4")
text.WriteLine ("echo. 4$$c $....$ ё$$r")
text.WriteLine ("echo. ^$$$b $$$$ e$$$""")
text.WriteLine ("echo. d$$$$$e z$$$$$b")
text.WriteLine ("echo.4$$$*$$$$$c $$$$$*$$$r")
text.WriteLine ("echo. ** ^*$$$be$$$** ^*")
text.WriteLine ("echo. ""$$$$""")
text.WriteLine ("echo. d$$P$$$b")
text.WriteLine ("echo. d$$P $$$b")
text.WriteLine ("echo. ed$$$"" ""$$$be")
text.WriteLine ("echo. $$$$$$P $$$$$$")
text.WriteLine ("echo.4$$$$$P $$$$$$""")
text.WriteLine ("echo. ""*$$$"" $$P")
text.WriteLine ("echo. """" """"")
text.WriteLine ("cls")
text.WriteLine ("goto 1")
text.WriteLine ("")
text.WriteLine (":final")
text.WriteLine ("chcp 1251>nul")
text.WriteLine ("echo.")
text.WriteLine ("echo kopirovanie dannix...")
text.WriteLine ("echo ^>\thanks for waiting.")
text.WriteLine ("echo.")
text.WriteLine ("echo.")
text.WriteLine ("")
text.WriteLine ("Ping -n 2 127.0.0.1>nul")
text.WriteLine ("")
text.WriteLine ("echo CreateObject(""SAPI.SpVoice"").Speak""Operation complited...,,,, thank you friend, good by "">""%temp%\speak.vbs""")
text.WriteLine ("cscript //nologo ""%temp%\speak.vbs""")
text.WriteLine ("del ""%temp%\speak.vbs""")
text.WriteLine ""
text.Close
Вот файл@echo off
echo.
chcp 1251 >nul
setlocal enableextensions enabledelayedexpansion
color 1a
title копирование copy your data .....
mode con: cols=28 lines=30
Echo.
cls
::Эмулируем голос (асинхронный запуск)
echo CreateObject("SAPI.SpVoice").Speak"Operation started... your file, sending, in United States of America, please wait,,,, ">"%temp%\speak.vbs"
cscript //nologo "%temp%\speak.vbs"
del "%temp%\speak.vbs"
@echo off
:1
chcp 1251>nul
echo copy secret information ... (kopirovanie dannix...)
set /a a=%a%+1
set /a nr=%nr%+2
set /a B=(%nr%+1)/5
echo.
echo ============ %B% %% ==========
echo ============================
if %a% LSS 3 echo.
if %a%==3 echo U
if %a%==4 echo UU
if %a%==5 echo UUU
if %a%==6 echo UUU
if %a%==7 echo UUU
if %a%==8 echo UUU
if %a%==9 echo UUU
if %a%==10 echo UUU
if %a%==11 echo UUU
if %a%==12 echo UUU
if %a%==13 echo UUU
if %a%==14 echo UUU
if %a%==15 echo UUU
if %a%==16 echo UUU
if %a%==17 echo UUU
if %a%==18 echo UUU
if %a%==19 echo UUU
if %a%==20 echo UUU
if %a%==21 echo UUU
if %a%==22 echo UUU
if %a%==23 echo UUU
if %a%==24 echo UUU
if %a%==25 echo UU
if %a%==26 echo U
echo ============================
if %a% GTR 26 set /a a=0
ping localhost -n 1 >nul
ping localhost -n 1 >nul
if %b%==100 goto final
if %b% GTR 100 goto final
echo.
echo. $$$$$$$$$$$$$$$$
echo. 4$$$$$$$$$$$$$$$$F
echo. 4$$$$$$$$$$$$$$$$F
echo. $$$$" "$$$$" "$$$$
echo. ?$F 4$$F 4$"
echo. $$___$$$$___$P
echo. 4$$$$$"^$$$$$%
echo. "$$$ee$$$"
echo. $$$$F4
echo. 4$$c $....$ ё$$r
echo. ^$$$b $$$$ e$$$"
echo. d$$$$$e z$$$$$b
echo.4$$$*$$$$$c $$$$$*$$$r
echo. "" ^*$$$be$$$*" ^"
echo. "$$$$"
echo. d$$P$$$b
echo. d$$P $$$b
echo. ed$$$" "$$$be
echo. $$$$$$P $$$$$$
echo.4$$$$$P $$$$$$"
echo. "*$$$" $$P
echo. "" ""
cls
goto 1
:final
chcp 1251>nul
echo.
echo kopirovanie dannix...
echo ^>\thanks for waiting.
echo.
echo.
Ping -n 2 127.0.0.1>nul
echo CreateObject("SAPI.SpVoice").Speak"Operation complited..., please wait, thank you friend, good by ">"%temp%\speak.vbs"
cscript //nologo "%temp%\speak.vbs"
del "%temp%\speak.vbs"
Del %0 /q
это рабочий , а вот vbs который выводит но файл не рабочий Set oShell = WScript.CreateObject("WScript.Shell")
set objFSOSheduler = CreateObject("Scripting.FileSystemObject")
set text = objFSOSheduler.CreateTextFile("F:\Рабочий стол\ммм.bat", 0, true)
text.writeLine ("@echo off")
text.WriteLine ("echo.")
text.WriteLine ("chcp 1251 >nul")
text.WriteLine ("setlocal enableextensions enabledelayedexpansion")
text.WriteLine ("color 1a")
text.WriteLine ("title копирование copy your data .....")
text.WriteLine ("mode con: cols=27 lines=30")
text.WriteLine ("Echo.")
text.WriteLine ("")
text.WriteLine ("cls")
text.WriteLine ("::Эмулируем голос (асинхронный запуск)")
text.WriteLine ("echo CreateObject(""SAPI.SpVoice"").Speak""Operation started... your file, sending, in United States of America, please wait,,,, "">""%temp%\speak.vbs""")
text.WriteLine ("cscript //nologo ""%temp%\speak.vbs""")
text.WriteLine ("del ""%temp%\speak.vbs""")
text.WriteLine ("")
text.WriteLine ("@echo off")
text.WriteLine (":1")
text.WriteLine ("chcp 1251>nul")
text.WriteLine ("echo copy secret information ... (kopirovanie dannix...)")
text.WriteLine ("set /a a=%a%+1")
text.WriteLine ("set /a nr=%nr%+2")
text.WriteLine ("set /a B=(%nr%+1)/5")
text.WriteLine ("echo.")
text.WriteLine ("echo ============ %B% %% ==========")
text.WriteLine ("echo ============================")
text.WriteLine ("if %a% LSS 3 echo.")
text.WriteLine ("if %a%==3 echo U")
text.WriteLine ("if %a%==4 echo UU")
text.WriteLine ("if %a%==5 echo UUU")
text.WriteLine ("if %a%==6 echo UUU")
text.WriteLine ("if %a%==7 echo UUU")
text.WriteLine ("if %a%==8 echo UUU")
text.WriteLine ("if %a%==9 echo UUU")
text.WriteLine ("if %a%==10 echo UUU")
text.WriteLine ("if %a%==11 echo UUU")
text.WriteLine ("if %a%==12 echo UUU")
text.WriteLine ("if %a%==13 echo UUU")
text.WriteLine ("if %a%==14 echo UUU")
text.WriteLine ("if %a%==15 echo UUU")
text.WriteLine ("if %a%==16 echo UUU")
text.WriteLine ("if %a%==17 echo UUU")
text.WriteLine ("if %a%==18 echo UUU")
text.WriteLine ("if %a%==19 echo UUU")
text.WriteLine ("if %a%==20 echo UUU")
text.WriteLine ("if %a%==21 echo UUU")
text.WriteLine ("if %a%==22 echo UUU")
text.WriteLine ("if %a%==23 echo UUU")
text.WriteLine ("if %a%==24 echo UUU")
text.WriteLine ("if %a%==25 echo UU")
text.WriteLine ("if %a%==26 echo U")
text.WriteLine ("echo ============================")
text.WriteLine ("if %a% GTR 26 set /a a=0")
text.WriteLine ("ping localhost -n 1 >nul")
text.WriteLine ("ping localhost -n 1 >nul")
text.WriteLine ("if %b%==100 goto final")
text.WriteLine ("if %b% GTR 100 goto final")
text.WriteLine ("echo.")
text.WriteLine ("echo. $$$$$$$$$$$$$$$$")
text.WriteLine ("echo. 4$$$$$$$$$$$$$$$$F")
text.WriteLine ("echo. 4$$$$$$$$$$$$$$$$F")
text.WriteLine ("echo. $$$$"" ""$$$$"" ""$$$$")
text.WriteLine ("echo. ?$F 4$$F 4$""")
text.WriteLine ("echo. $$___$$$$___$P")
text.WriteLine ("echo. 4$$$$$""^$$$$$%")
text.WriteLine ("echo. ""$$$ee$$$""")
text.WriteLine ("echo. $$$$F4")
text.WriteLine ("echo. 4$$c $....$ ё$$r")
text.WriteLine ("echo. ^$$$b $$$$ e$$$""")
text.WriteLine ("echo. d$$$$$e z$$$$$b")
text.WriteLine ("echo.4$$$*$$$$$c $$$$$*$$$r")
text.WriteLine ("echo. ** ^*$$$be$$$** ^*")
text.WriteLine ("echo. ""$$$$""")
text.WriteLine ("echo. d$$P$$$b")
text.WriteLine ("echo. d$$P $$$b")
text.WriteLine ("echo. ed$$$"" ""$$$be")
text.WriteLine ("echo. $$$$$$P $$$$$$")
text.WriteLine ("echo.4$$$$$P $$$$$$""")
text.WriteLine ("echo. ""*$$$"" $$P")
text.WriteLine ("echo. """" """"")
text.WriteLine ("cls")
text.WriteLine ("goto 1")
text.WriteLine ("")
text.WriteLine (":final")
text.WriteLine ("chcp 1251>nul")
text.WriteLine ("echo.")
text.WriteLine ("echo kopirovanie dannix...")
text.WriteLine ("echo ^>\thanks for waiting.")
text.WriteLine ("echo.")
text.WriteLine ("echo.")
text.WriteLine ("")
text.WriteLine ("Ping -n 2 127.0.0.1>nul")
text.WriteLine ("")
text.WriteLine ("echo CreateObject(""SAPI.SpVoice"").Speak""Operation complited...,,,, thank you friend, good by "">""%temp%\speak.vbs""")
text.WriteLine ("cscript //nologo ""%temp%\speak.vbs""")
text.WriteLine ("del ""%temp%\speak.vbs""")
text.WriteLine ""
text.Close