-
Notifications
You must be signed in to change notification settings - Fork 238
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
Fixing match-replace logic #149
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mzack9999
added
Type: Bug
Inconsistencies or issues which will cause an issue or problem for users or implementors.
Status: In Progress
This issue is being worked on, and has someone assigned.
labels
Aug 1, 2022
SonarCloud Quality Gate failed. |
Mzack9999
added
Status: Review Needed
The issue has a PR attached to it which needs to be reviewed
and removed
Status: In Progress
This issue is being worked on, and has someone assigned.
labels
Aug 1, 2022
Ice3man543
approved these changes
Aug 2, 2022
ehsandeep
approved these changes
Aug 3, 2022
ehsandeep
added
Status: Completed
Nothing further to be done with this issue. Awaiting to be closed.
and removed
Status: Review Needed
The issue has a PR attached to it which needs to be reviewed
labels
Aug 3, 2022
./proxify -request-match-replace-dsl "replace(request,'curl','**********************')" -vv -hp http://127.0.0.1:8080
_ ___
___ _______ __ __ (_) _/_ __
/ _ \/ __/ _ \\ \ // / _/ // /
/ .__/_/ \___/_\_\/_/_/ \_, /
/_/ /___/ v0.0.7
projectdiscovery.io
Use with caution. You are responsible for your actions
Developers assume no liability and are not responsible for any misuse or damage.
HTTP Proxy Listening on 127.0.0.1:8888
Socks5 Proxy Listening on 127.0.0.1:10080
Saving traffic to logs
Using upstream HTTP proxies: ["http://127.0.0.1:8080"]
2022/08/03 17:56:42 [001] INFO: Got request / google.com GET http://google.com/
GET http://google.com/ HTTP/1.1
Accept: */*
Proxy-Connection: Keep-Alive
User-Agent: **********************/7.79.1
2022/08/03 17:56:42 [001] INFO: Sending request GET http://google.com/
2022/08/03 17:56:42 [001] INFO: Received response 301 Moved Permanently
HTTP/1.1 301 Moved Permanently
Connection: close
Content-Length: 219
Cache-Control: public, max-age=2592000
Content-Type: text/html; charset=UTF-8
Date: Wed, 03 Aug 2022 12:26:42 GMT
Expires: Fri, 02 Sep 2022 12:26:42 GMT
Location: http://www.google.com/
Server: gws
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>
2022/08/03 17:56:42 [001] INFO: Copying response to client 301 Moved Permanently [301]
2022/08/03 17:56:42 [001] INFO: Copied 219 bytes to client error=<nil> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Status: Completed
Nothing further to be done with this issue. Awaiting to be closed.
Type: Bug
Inconsistencies or issues which will cause an issue or problem for users or implementors.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
This PR fixes #136 by overriding the original request/response properties with the DSL evaluated ones. For some weird reason, go1.18 passing a pointer of type
*http.Request
by reference to a nested sequence of functions causes some stack confusion, causing the original instance to be immutable.Checklist
Example
Web Server
Proxify
Curl