Comments (18)
The reason is that the script (script.bat
) exits with code 1.
You can try use -show-errors
option for show this error in browser.
from shell2http.
My browser showing empty response after adding -show-errors option for show this error in browser like below
shell2http -form -show-errors /starttest "C:\Selva\software\shell2http\script.bat"
2020/03/02 15:32:07 register: /starttest (C:\Selva\software\shell2http\script.bat)
2020/03/02 15:32:07 register: / (index page)
2020/03/02 15:32:07 listen http://:8080/
2020/03/02 15:32:09 localhost:8080 [::1]:57083 GET /starttest "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36"
2020/03/02 15:32:09 exec error: exit status 1
from shell2http.
sorry, it turned out that this option is about another. Anyway, you should investigate your script, why it exits with code 1
from shell2http.
okay thanks man
from shell2http.
I tired with basic command in the bat file, Still getting above error only, Do you any idea about this
from shell2http.
shell2http -form /starttest "C:\Selva\software\shell2http\sam.bat"
2020/03/02 15:56:06 register: /starttest (C:\Selva\software\shell2http\sam.bat)
2020/03/02 15:56:06 register: / (index page)
2020/03/02 15:56:06 listen http://:8080/
2020/03/02 15:56:09 localhost:8080 [::1]:58464 GET /starttest "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0"
2020/03/02 15:56:09 exec error: exit status 1
2020/03/02 15:56:11 localhost:8080 [::1]:58464 GET /starttest "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0"
2020/03/02 15:56:11 exec error: exit status 1
from shell2http.
I don’t have Windows right now, but please try that script:
ipconfig
if errorlevel 1 (
echo Failure reason given is %errorlevel%
exit /b 0
)
and run command like this:
shell2http -include-stderr /starttest "c:\path\to\script\sam.bat"
from shell2http.
still getting same issue. let me try this same in linux machine
from shell2http.
from shell2http.
You should use real path to script, not "c:\path\to\script\sam.bat"
(this is example)
from shell2http.
And please just run this script from terminal, is it running normally?
from shell2http.
ran this script from terminal, it is running fine
from shell2http.
folder structure for your reference
from shell2http.
i see - test.bat is nothing output
from shell2http.
you can use ipconfig directly:
shell2http -include-stderr /starttest ipconfig
from shell2http.
tired to use directly, but getting different error
shell2http.exe -include-stderr -port=8010 /test "C:\Selva\NeoLoad 7.2\bin\NeoLoadCmd.exe"
2020/03/03 12:27:41 register: /test (C:\Selva\NeoLoad 7.2\bin\NeoLoadCmd.exe)
2020/03/03 12:27:41 register: / (index page)
2020/03/03 12:27:41 listen http://:8010/
2020/03/03 12:27:49 localhost:8010 [::1]:58124 GET /test "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.122 Safari/537.36"
2020/03/03 12:27:59 exec error: exit status 3221226505
from shell2http.
script (or any program) must be return 0
exit code, in any other case there will be such an error
from shell2http.
Planning to build an own API according to my recruitment, Anyway, Thanks for your help
from shell2http.
Related Issues (20)
- can execute powershell on Windows ? HOT 1
- I receive the error "command not found", but actually exists HOT 4
- An option to make the server handle only one request? I.e. shutdown after giving the response. HOT 4
- Serve file from disk HOT 2
- Rebuild docker hub image HOT 1
- Default working dir on start HOT 3
- Passing Spaces in `$v_params` to Command HOT 3
- "No such file or directory" err HOT 3
- How can get request body from command? (question) HOT 2
- Parsing of ASCII encoding not working for all characters HOT 1
- Create new shell2http binaries to solve CVE-2016-2183 HOT 3
- support async call on windows HOT 2
- Support parameter transfer command HOT 2
- What are these logs? HOT 1
- I would like to prohibit executing some commands when using shell2http HOT 1
- Regarding Required Installation and Operation Storage Space HOT 1
- Ability to define multiple endpoints in dockerfile HOT 1
- Support configuration file method HOT 5
- Using a POST request to write JSON to script stdin HOT 1
- Create routes to shell mappings using JSON HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shell2http.