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