Ettercap / ettercap

Ettercap Project
http://www.ettercap-project.org
GNU General Public License v2.0
2.33k stars 488 forks source link

Pcre_regex or replace has no effect in Ettercap filters #1248

Open emeraldskygroup opened 6 months ago

emeraldskygroup commented 6 months ago

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

LocutusOfBorg commented 6 months ago

Are you using latest git?

koeppea commented 6 months ago

any update to Gianfranco's question?