Trying to pipe raw output sent into a localhost socket into a text file.
>picrelated is address + type of data i'm talking about.
How can I do this in windows?
Already triedpowershell -command "invoke-restmethod http://127.0.0.1:31001" > test.txt
andpowershell -command "(invoke-webrequest http://127.0.0.1:31001).Content" > test.txt
I'm a helpless powershell baby :c
>>59148169
Aw shiet I made a new thread I thought I was in /sqt/.
Sorry /g/.
This is the error it gives:
>invoke-webrequest : The server committed a protocol violation.
Section=ResponseStatusLine
At line:1 char:1
+ invoke-webrequest http://127.0.0.1:31001
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:Htt
pWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShe
ll.Commands.InvokeWebRequestCommand
Use Python.
>>59148169
powershell curl http://127.0.0.1:31001 >test.txt
native .net function sucks.
>>59149044
It times out fuck my life
>>59149358
use --local-port option on curl with POST as -x
>>59149358
remove the http:// because it redirects on port 80
>>59149387
Sadly I'll have to be spoonfed until I get around this powershell hurdle.powershell curl http://127.0.0.1:31001 >test.txt -x --local-port
Liek dis?
>>59149413
curl : The operation has timed out.
At line:1 char:1
+ curl 127.0.0.1:31001
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:Htt
pWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShe
ll.Commands.InvokeWebRequestCommand
>error with http removed is basically the same
>>59149437powershell wget http://127.0.0.1:31001 -OutFile test.txt