2017-02-25 31 views
0

我有一個批處理文件,其中包括一些JScript,但我想將其轉換爲一個.exe因此腳本不能由他人(加密)可以看出批量+ JScript中以.EXE

如何我可以這樣做嗎?

我試過蝙蝠到exe,但不起作用,因爲我有JScript

的代碼基本上是推出新的網站,並輸入鍵輸入,並且將.exe管理推出該網站,但僅此而已

腳本:

@if (@CodeSection == @Batch) @then 

@echo off 

title Top Top 
color 0c 

if "%inputParty%" == "0" (
    set title= %site% - Bean - Partyless 
) 

set /p site= Site: 
set /p Clas= Username or Email: 
set /p Party= Party: 
set /p Cars= Cars: 
set /p capture= Capture: 

set inputsite= Site: %site% 
set inputClas= Clas: UNKNOWN 
set inputParty= Party: %Party% 
set inputCars= Cars: %Cars% 
set inputcapture= Capture: %capture% 
set inputhide= [hide] *Bean* [/hide] 


if "%Clas%" == "Username" (
    set inputClas= Clas: Username:Password 
) 

if "%Clas%" == "Email" (
    set inputClas= Clas: Email:Password 
) 

if "%Clas%" == "username" (
    set inputClas= Clas: Username:Password 
) 

if "%Clas%" == "email" (
    set inputClas= Clas: Email:Password 
) 


set title= %site% - Bean 
if "%Party%" == "0" (
    set title= %site% - Bean - Partyless 
) 

set SendKeys=CScript //nologo //E:JScript "%~F0" 
START https://Cear.io/xxxxx.php?fid=30 
timeout /t 5 

:: ACCESS TITLE INPUT BOX 
%SendKeys% "{TAB}" 
%SendKeys% "{TAB}" 
%SendKeys% "{TAB}" 
%SendKeys% "{TAB}" 
%SendKeys% "{TAB}" 
%SendKeys% "{TAB}" 
%SendKeys% "{TAB}" 
%SendKeys% "{TAB}" 
%SendKeys% "{TAB}" 
%SendKeys% "{TAB}" 
%SendKeys% "{TAB}" 
%SendKeys% "{TAB}" 
%SendKeys% "{TAB}" 
%SendKeys% "{TAB}" 

:: INPUT TITLE 
%SendKeys% "%title%" 

:: REDIRECT INPUT TO DESCRIPTION 
%SendKeys% "{TAB}" 

:: INPUT DESCRIPTION 
%SendKeys% "%inputsite%" 
%SendKeys% "{ENTER}" 
%SendKeys% "%inputClas%" 
%SendKeys% "{ENTER}" 
%SendKeys% "%inputParty%" 
%SendKeys% "{ENTER}" 
%SendKeys% "%inputCars%" 
%SendKeys% "{ENTER}" 
%SendKeys% "%inputcapture%" 
%SendKeys% "{ENTER}" 
%SendKeys% "{ENTER}" 
%SendKeys% "%inputhide%" 

if "%Party%"=="0" (goto prefix) 
ELSE (
    goto end 
) 

:prefix 

:: INPUT PREFIX 
set x= 20 
for /L %%A in (1,1,%x%) do (
    %SendKeys% "{TAB}" 
) 
    %SendKeys% "{DOWN}" 

:end 

goto :EOF 


@end 
// JScript section 

var WshShell = WScript.CreateObject("WScript.Shell"); 
WshShell.SendKeys(WScript.Arguments(0)); 

輸出:

enter image description here

+0

向我們展示代碼... – npocmaka

+0

@npocmaka已添加! – Hubgum

+2

代碼和文本輸出應該是[複製並粘貼](http://meta.stackoverflow.com/q/303812/995714),不在圖像中,不在外部鏈接 –

回答

0

雖然轉換.BAT到.exe文件在所有情況下是一個壞主意,這種方法應該能夠解決您的問題:

@echo off 

title Top Top 
color 0c 

if "%inputParty%" == "0" (
    set title= %site% - Bean - Partyless 
) 


set /p site= Site: 
set /p Clas= Username or Email: 
set /p Party= Party: 
set /p Cars= Cars: 
set /p capture= Capture: 

set inputsite= Site: %site% 
set inputClas= Clas: UNKNOWN 
set inputParty= Party: %Party% 
set inputCars= Cars: %Cars% 
set inputcapture= Capture: %capture% 
set inputhide= [hide] *Bean* [/hide] 


if /I "%Clas%" == "Username" (
    set inputClas= Clas: Username:Password 
) 

if /I "%Clas%" == "Email" (
    set inputClas= Clas: Email:Password 
) 


set title= %site% - Bean 
if "%Party%" == "0" (
    set title= %site% - Bean - Partyless 
) 


rem // JScript section 

echo var WshShell = WScript.CreateObject("WScript.Shell"); > SendKeys.js 
echo WshShell.SendKeys(WScript.Arguments(0)); >> SendKeys.js 

set SendKeys=CScript //nologo SendKeys.js 
START https://Cear.io/xxxxx.php?fid=30 
timeout /t 5 

:: ACCESS TITLE INPUT BOX 
for /L %%i in (1,1,14) do %SendKeys% "{TAB}" 

:: INPUT TITLE 
%SendKeys% "%title%" 

:: REDIRECT INPUT TO DESCRIPTION 
%SendKeys% "{TAB}" 

:: INPUT DESCRIPTION 
%SendKeys% "%inputsite%{ENTER}" 
%SendKeys% "%inputClas%{ENTER}" 
%SendKeys% "%inputParty%{ENTER}" 
%SendKeys% "%inputCars%{ENTER}" 
%SendKeys% "%inputcapture%{ENTER}{ENTER}" 
%SendKeys% "%inputhide%" 

if "%Party%" neq "0" goto end 

:: INPUT PREFIX 
for /L %%A in (1,1,20) do %SendKeys% "{TAB}" 
%SendKeys% "{DOWN}" 

:end 
del SendKeys.js 

goto :EOF 
+0

非常感謝!這工作! – Hubgum

0

Hybrid JSBatch文件基本上是一個'hack'並且不能用作e xpected如果編譯。
嘗試使用「Bat to Exe Converter」從f2ko.de

而不是使用一個混合JSBatch的,它會更容易,如果你的程序「擴展命令」輸入鍵盤上的按鍵。

腳本示例

@echo off 
start notepad.exe 
timeout 3 >nul 
%extd% /sendkeys "Hello World" 

腳本(修改)

@echo off 


title Top Top 
color 0c 

if "%inputParty%" == "0" (
    set title= %site% - Bean - Partyless 
) 


set /p site= Site: 
set /p Clas= Username or Email: 
set /p Party= Party: 
set /p Cars= Cars: 
set /p capture= Capture: 

set inputsite= Site: %site% 
set inputClas= Clas: UNKNOWN 
set inputParty= Party: %Party% 
set inputCars= Cars: %Cars% 
set inputcapture= Capture: %capture% 
set inputhide= [hide] *Bean* [/hide] 


if "%Clas%" == "Username" (
    set inputClas= Clas: Username:Password 
) 

if "%Clas%" == "Email" (
    set inputClas= Clas: Email:Password 
) 

if "%Clas%" == "username" (
    set inputClas= Clas: Username:Password 
) 

if "%Clas%" == "email" (
    set inputClas= Clas: Email:Password 
) 



set title= %site% - Bean 
if "%Party%" == "0" (
    set title= %site% - Bean - Partyless 
) 

START https://Cear.io/xxxxx.php?fid=30 
timeout /t 5 

:: ACCESS TITLE INPUT BOX 
%extd% /sendkey {TAB} 
%extd% /sendkey {TAB} 
%extd% /sendkey {TAB} 
%extd% /sendkey {TAB} 
%extd% /sendkey {TAB} 
%extd% /sendkey {TAB} 
%extd% /sendkey {TAB} 
%extd% /sendkey {TAB} 
%extd% /sendkey {TAB} 
%extd% /sendkey {TAB} 
%extd% /sendkey {TAB} 
%extd% /sendkey {TAB} 
%extd% /sendkey {TAB} 
%extd% /sendkey {TAB} 

:: INPUT TITLE 
%extd% /sendkeys "%title%" 

:: REDIRECT INPUT TO DESCRIPTION 
%extd% /sendkey {TAB} 


:: INPUT DESCRIPTION 
%extd% /sendkeys "%inputsite%" 
%extd% /sendkey {ENTER} 
%extd% /sendkeys "%inputClas%" 
%extd% /sendkey {ENTER} 
%extd% /sendkeys "%inputParty%" 
%extd% /sendkey {ENTER} 
%extd% /sendkeys "%inputCars%" 
%extd% /sendkey {ENTER} 
%extd% /sendkeys "%inputcapture%" 
%extd% /sendkey {ENTER} 
%extd% /sendkey {ENTER} 
%extd% /sendkeys "%inputhide%" 

if "%Party%"=="0" (goto prefix) 
ELSE (
goto end 
) 


:prefix 
:: INPUT PREFIX 
set x= 20 
for /L %%A in (1,1,%x%) do (
%extd% /sendkey {TAB} 
) 
%extd% /sendkey {DOWN} 

:end 
goto :EOF 
+0

謝謝你的回覆,我試過你發給我的,但是我得到這個錯誤:'/ sendkey'不被識別爲內部或外部命令, 可操作的程序或批處理文件。 – Hubgum

+0

@Hubgum您必須使用Bat To Exe轉換器將其轉換爲EXE第一個 – samdd

+0

好吧,所以我在將它轉換爲.exe後嘗試啓動該網站,但未輸入任何鍵,然後是.exe關閉。 – Hubgum