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

Added dynamic response body support to HTTP Server #374

Merged
merged 4 commits into from
Sep 18, 2022

Conversation

Ice3man543
Copy link
Member

@Ice3man543 Ice3man543 commented Sep 12, 2022

Closes #364

Dynamic HTTP request example -

> GET /?body=test&header=Key:value&status=404 HTTP/2
> Host: ccfn5rvkobjgg3eaq0h0at95rftfji6p3.domain.com
> user-agent: curl/7.79.1
> accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 250)!
< HTTP/2 404
< key: value
< server: domain.com
< x-interactsh-version: 1.0.7
< content-type: text/plain; charset=utf-8
< content-length: 4
< date: Mon, 12 Sep 2022 17:58:44 GMT
<
{ [4 bytes data]

@Ice3man543 Ice3man543 self-assigned this Sep 12, 2022
@Ice3man543 Ice3man543 linked an issue Sep 12, 2022 that may be closed by this pull request
pkg/server/http_server.go Fixed Show fixed Hide fixed
pkg/server/http_server.go Fixed Show fixed Hide fixed
pkg/server/http_server.go Show resolved Hide resolved
@Ice3man543 Ice3man543 added the Status: Review Needed The issue has a PR attached to it which needs to be reviewed label Sep 12, 2022
Copy link
Member

@ehsandeep ehsandeep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curl -i 'https://ccg7b542vtc0000730kgggedi1hyyyyyb.hackwithautomation.com/?status=307&body=this+is+example+body&delay=1&header=header1:value1&header=header1:value12'

HTTP/2 307 
header1: value1
header1: value12
server: hackwithautomation.com
x-interactsh-version: 1.0.7
content-type: text/plain; charset=utf-8
content-length: 20
date: Tue, 13 Sep 2022 12:31:05 GMT

this is example body

@Ice3man543 we can add a few lines for this option under the uses section of the readme.

@sonarcloud
Copy link

sonarcloud bot commented Sep 13, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

81.2% 81.2% Coverage
0.0% 0.0% Duplication

@ehsandeep ehsandeep merged commit 48effd9 into dev Sep 18, 2022
@ehsandeep ehsandeep deleted the dynamic-response-body branch September 18, 2022 07:27
@ehsandeep ehsandeep removed the Status: Review Needed The issue has a PR attached to it which needs to be reviewed label Sep 18, 2022
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

Successfully merging this pull request may close these issues.

Dynamic response control for payloads
3 participants