feat: add response modification
This commit is contained in:
+8
-3
@@ -52,19 +52,24 @@ BOOL WINAPI consoleHandler(DWORD dwType)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void reqListener(const std ::string& url, std::string& body, std::string& headers, bool& blockOutgoing)
|
void reqListener(const std ::string& host, std::string& body, std::string& headers, bool& blockOutgoing)
|
||||||
{
|
{
|
||||||
url;
|
host;
|
||||||
body;
|
body;
|
||||||
headers;
|
headers;
|
||||||
blockOutgoing;
|
blockOutgoing;
|
||||||
}
|
}
|
||||||
|
|
||||||
void resListener(const std::string& host, std::string& body, std::string& headers, bool wasBlocked) {
|
void resListener(const std::string& host, std::string& body, std::string& headers, bool wasBlocked)
|
||||||
|
{
|
||||||
host;
|
host;
|
||||||
body;
|
body;
|
||||||
headers;
|
headers;
|
||||||
wasBlocked;
|
wasBlocked;
|
||||||
|
if (host.find("www.google.com") != std::string::npos)
|
||||||
|
{
|
||||||
|
body = "<h1>TinyMITM response modification example!</h1>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
|||||||
Reference in New Issue
Block a user