Skip to content

excludeFromSpider in Spider class does not seem to exclude URL #11

Description

@petermartin2002

Hi

I am looking again at the zap java api. And I am writing a regex to exclude jpg, png and gif paths from the spider.

    zapSpider.excludeFromSpider("\\.(?!(jpg|png|gif)$)[a-z]+$");
    zapSpider.spider(myApp.BASE_URL);
    int spiderID = zapSpider.getLastSpiderScanId();

I am wondering if there have been any issues encountered with the regxing previously and if the regex I am giving is valid?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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