Skip to content

Scan wiki pages

Marco Rosa edited this page Jul 26, 2021 · 6 revisions

How to scan a wiki page

  1. Install the dependencies (possibly using a virtualenv)

  2. Instantiate the client (either Postgres or sqlite)

    from credentialdigger import PgClient
    
    c = PgClient(dbhost='xxx.xxx.xxx.xxx', dbport=NUM, dbname='mydbname', dbuser='myusername', dbpassword='mypassword')

    or

    from credentialdigger import SqliteClient
    
    c = SqliteClient(path='/path/to/data.db')
  3. [OPTIONAL] Add the repository

    c.add_repo(url='https://github.com/user/repo')
  4. Launch the scan of the wiki pages of a repository

    new_discoveries = c.scan_wiki(repo_url=REPO_URL,
                                  category=CATEGORY,
                                  models=MODELS,
                                  debug=DEBUG)

    Wiki pages are scanned in the same way that repositories are (refer to Scan a repository).