greynoise 2.3.0__tar.gz → 3.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- greynoise-3.0.0/.bumpversion.cfg +29 -0
- greynoise-3.0.0/.circleci/config.yml +188 -0
- greynoise-3.0.0/.dockerignore +10 -0
- greynoise-3.0.0/.editorconfig +19 -0
- greynoise-3.0.0/.github/CODEOWNERS +5 -0
- greynoise-3.0.0/.github/dependabot.yml +13 -0
- greynoise-3.0.0/.github/workflows/slack_release_notice.yml +59 -0
- greynoise-3.0.0/.gitignore +113 -0
- greynoise-3.0.0/.pre-commit-config.yaml +34 -0
- greynoise-3.0.0/.readthedocs.yml +12 -0
- greynoise-3.0.0/.yamllint +9 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/CHANGELOG.rst +39 -1
- greynoise-3.0.0/Dockerfile +9 -0
- greynoise-3.0.0/Makefile +0 -0
- greynoise-3.0.0/PKG-INFO +132 -0
- greynoise-3.0.0/docs/Makefile +20 -0
- greynoise-3.0.0/docs/source/changelog.rst +1 -0
- greynoise-3.0.0/docs/source/conf.py +62 -0
- greynoise-3.0.0/docs/source/index.rst +29 -0
- greynoise-3.0.0/docs/source/introduction.rst +20 -0
- greynoise-3.0.0/docs/source/reference.rst +59 -0
- greynoise-3.0.0/docs/source/sample.py +26 -0
- greynoise-3.0.0/docs/source/tutorial.rst +1164 -0
- greynoise-3.0.0/pyproject.toml +56 -0
- greynoise-3.0.0/pytest.ini +3 -0
- greynoise-3.0.0/release.md +92 -0
- greynoise-3.0.0/requirements/common.txt +11 -0
- greynoise-3.0.0/requirements/dev.txt +5 -0
- greynoise-3.0.0/requirements/docs.txt +5 -0
- greynoise-3.0.0/requirements/test.txt +16 -0
- greynoise-3.0.0/reset_changelog.py +53 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/setup.cfg +0 -4
- greynoise-3.0.0/sonar-project.properties +13 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/__version__.py +2 -2
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/api/__init__.py +436 -343
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/cli/decorator.py +9 -4
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/cli/formatter.py +24 -25
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/cli/subcommand.py +20 -44
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/cli/templates/analyze.txt.j2 +2 -2
- greynoise-3.0.0/src/greynoise/cli/templates/gnql_query.txt.j2 +24 -0
- greynoise-3.0.0/src/greynoise/cli/templates/ip_context_result.txt.j2 +112 -0
- greynoise-3.0.0/src/greynoise/cli/templates/ip_multi_context.txt.j2 +6 -0
- greynoise-3.0.0/src/greynoise/cli/templates/ip_quick_check.txt.j2 +14 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/cli/templates/macros.txt.j2 +23 -2
- greynoise-3.0.0/src/greynoise/cli/templates/riot.txt.j2 +32 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/util.py +89 -19
- greynoise-3.0.0/tests/cli/test_formatter.py +558 -0
- greynoise-3.0.0/tests/cli/test_init.py +21 -0
- greynoise-3.0.0/tests/cli/test_subcommand.py +2362 -0
- greynoise-3.0.0/tests/test_api.py +1202 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/tests/test_util.py +152 -2
- greynoise-3.0.0/tox.ini +12 -0
- greynoise-2.3.0/PKG-INFO +0 -554
- greynoise-2.3.0/setup.py +0 -60
- greynoise-2.3.0/src/greynoise/cli/templates/gnql_query.txt.j2 +0 -24
- greynoise-2.3.0/src/greynoise/cli/templates/interesting.txt.j2 +0 -4
- greynoise-2.3.0/src/greynoise/cli/templates/ip_context_result.txt.j2 +0 -84
- greynoise-2.3.0/src/greynoise/cli/templates/ip_multi_context.txt.j2 +0 -70
- greynoise-2.3.0/src/greynoise/cli/templates/ip_quick_check.txt.j2 +0 -13
- greynoise-2.3.0/src/greynoise/cli/templates/riot.txt.j2 +0 -32
- greynoise-2.3.0/src/greynoise.egg-info/PKG-INFO +0 -554
- greynoise-2.3.0/src/greynoise.egg-info/SOURCES.txt +0 -46
- greynoise-2.3.0/src/greynoise.egg-info/dependency_links.txt +0 -1
- greynoise-2.3.0/src/greynoise.egg-info/entry_points.txt +0 -2
- greynoise-2.3.0/src/greynoise.egg-info/not-zip-safe +0 -1
- greynoise-2.3.0/src/greynoise.egg-info/requires.txt +0 -11
- greynoise-2.3.0/src/greynoise.egg-info/top_level.txt +0 -1
- greynoise-2.3.0/tests/test_api.py +0 -819
- {greynoise-2.3.0 → greynoise-3.0.0}/LICENSE +0 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/MANIFEST.in +0 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/README.rst +0 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/__init__.py +0 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/api/filter.py +0 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/cli/__init__.py +0 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/cli/helper.py +0 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/cli/parameter.py +0 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/cli/templates/cvedetails.txt.j2 +0 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/cli/templates/gnql_stats.txt.j2 +0 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/cli/templates/ip_community.txt.j2 +0 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/cli/templates/ip_context.txt.j2 +0 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/cli/templates/personadetails.txt.j2 +0 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/cli/templates/sensoractivity.txt.j2 +0 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/cli/templates/sensorlist.txt.j2 +0 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/cli/templates/similarity.txt.j2 +0 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/cli/templates/stats.txt.j2 +0 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/cli/templates/timeline.txt.j2 +0 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/cli/templates/timelinehourly.txt.j2 +0 -0
- {greynoise-2.3.0 → greynoise-3.0.0}/src/greynoise/exceptions.py +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[bumpversion]
|
|
2
|
+
current_version = 3.0.0
|
|
3
|
+
tag = False
|
|
4
|
+
commit = False
|
|
5
|
+
|
|
6
|
+
[bumpversion:file:setup.py]
|
|
7
|
+
search = version="{current_version}"
|
|
8
|
+
replace = version="{new_version}"
|
|
9
|
+
|
|
10
|
+
[bumpversion:file:src/greynoise/__version__.py]
|
|
11
|
+
search = __version__ = "{current_version}"
|
|
12
|
+
replace = __version__ = "{new_version}"
|
|
13
|
+
|
|
14
|
+
[bumpversion:file:docs/source/conf.py]
|
|
15
|
+
search = release = "{current_version}"
|
|
16
|
+
replace = release = "{new_version}"
|
|
17
|
+
|
|
18
|
+
[bumpversion:file:CHANGELOG.rst:date]
|
|
19
|
+
search = **Date**: unreleased
|
|
20
|
+
replace = **Date**: {now:%B %d, %Y}
|
|
21
|
+
|
|
22
|
+
[bumpversion:file:CHANGELOG.rst:version]
|
|
23
|
+
search = `dev`
|
|
24
|
+
replace = `{new_version}`
|
|
25
|
+
|
|
26
|
+
[bumpversion:file:CHANGELOG.rst:version_range]
|
|
27
|
+
search = {current_version}...HEAD
|
|
28
|
+
replace = {current_version}...{new_version}
|
|
29
|
+
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 2.1
|
|
3
|
+
|
|
4
|
+
TAGS_FILTER: &TAGS_FILTER
|
|
5
|
+
tags:
|
|
6
|
+
only: /v.*/
|
|
7
|
+
|
|
8
|
+
workflows:
|
|
9
|
+
version: 2
|
|
10
|
+
build:
|
|
11
|
+
jobs:
|
|
12
|
+
- py38:
|
|
13
|
+
filters:
|
|
14
|
+
<<: *TAGS_FILTER
|
|
15
|
+
- py39:
|
|
16
|
+
filters:
|
|
17
|
+
<<: *TAGS_FILTER
|
|
18
|
+
- py310:
|
|
19
|
+
filters:
|
|
20
|
+
<<: *TAGS_FILTER
|
|
21
|
+
- py311:
|
|
22
|
+
filters:
|
|
23
|
+
<<: *TAGS_FILTER
|
|
24
|
+
- py312:
|
|
25
|
+
filters:
|
|
26
|
+
<<: *TAGS_FILTER
|
|
27
|
+
- sonarcloud:
|
|
28
|
+
requires:
|
|
29
|
+
# generate static analysis and coverage reports in py37 job
|
|
30
|
+
# and upload them to sonarcloud.io in sonarcloud job
|
|
31
|
+
- py39
|
|
32
|
+
- pypi:
|
|
33
|
+
requires:
|
|
34
|
+
# release to pypi only when test cases pass in all python versions
|
|
35
|
+
- py38
|
|
36
|
+
- py39
|
|
37
|
+
- py310
|
|
38
|
+
- py311
|
|
39
|
+
- py312
|
|
40
|
+
filters:
|
|
41
|
+
<<: *TAGS_FILTER
|
|
42
|
+
branches:
|
|
43
|
+
ignore: /.*/
|
|
44
|
+
|
|
45
|
+
DEFAULT_STEPS: &DEFAULT_STEPS
|
|
46
|
+
- checkout
|
|
47
|
+
- run: &CREATE_VIRTUALENV_STEP
|
|
48
|
+
name: Create virtualenv
|
|
49
|
+
command: |
|
|
50
|
+
virtualenv venv
|
|
51
|
+
echo ". venv/bin/activate" >> $BASH_ENV
|
|
52
|
+
- run: &INSTALL_DEPENDENCIES_STEP
|
|
53
|
+
name: Install dependencies
|
|
54
|
+
command: |
|
|
55
|
+
pip install --upgrade pip
|
|
56
|
+
pip install -r requirements/test.txt -e .
|
|
57
|
+
- run:
|
|
58
|
+
name: Test cases
|
|
59
|
+
command: pytest --junitxml=workspace/test_results/pytest.xml tests
|
|
60
|
+
- store_test_results:
|
|
61
|
+
path: workspace/test_results
|
|
62
|
+
|
|
63
|
+
jobs:
|
|
64
|
+
py310:
|
|
65
|
+
docker:
|
|
66
|
+
- image: cimg/python:3.10
|
|
67
|
+
steps:
|
|
68
|
+
- checkout
|
|
69
|
+
- run: *CREATE_VIRTUALENV_STEP
|
|
70
|
+
- run: *INSTALL_DEPENDENCIES_STEP
|
|
71
|
+
- run:
|
|
72
|
+
name: Style check (yamllint)
|
|
73
|
+
command: yamllint .
|
|
74
|
+
- run:
|
|
75
|
+
name: Style check (black)
|
|
76
|
+
command: black --check src tests docs
|
|
77
|
+
- run:
|
|
78
|
+
name: Style check (isort)
|
|
79
|
+
command: isort --check-only src/**/*.py tests/**/*.py docs/**/*.py
|
|
80
|
+
- run:
|
|
81
|
+
name: Style check (rst)
|
|
82
|
+
command: rst-lint *.rst
|
|
83
|
+
- run:
|
|
84
|
+
name: Static analysis (flake8)
|
|
85
|
+
command: flake8 src tests docs
|
|
86
|
+
- run:
|
|
87
|
+
name: Static analysis (pylint)
|
|
88
|
+
command: |
|
|
89
|
+
mkdir workspace
|
|
90
|
+
pylint \
|
|
91
|
+
--exit-zero \
|
|
92
|
+
--reports no \
|
|
93
|
+
--msg-template='{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}' \
|
|
94
|
+
src > workspace/pylint.txt
|
|
95
|
+
- run:
|
|
96
|
+
name: Test cases
|
|
97
|
+
command: |
|
|
98
|
+
. venv/bin/activate
|
|
99
|
+
pytest \
|
|
100
|
+
--cov=greynoise \
|
|
101
|
+
--cov-report=xml:workspace/coverage/report.xml \
|
|
102
|
+
--junitxml=workspace/test_results/pytest.xml \
|
|
103
|
+
tests
|
|
104
|
+
- persist_to_workspace:
|
|
105
|
+
root: workspace
|
|
106
|
+
paths:
|
|
107
|
+
- pylint.txt
|
|
108
|
+
- coverage/report.xml
|
|
109
|
+
- test_results/pytest.xml
|
|
110
|
+
- store_test_results:
|
|
111
|
+
path: workspace/test_results
|
|
112
|
+
|
|
113
|
+
py38:
|
|
114
|
+
docker:
|
|
115
|
+
- image: cimg/python:3.8
|
|
116
|
+
steps: *DEFAULT_STEPS
|
|
117
|
+
|
|
118
|
+
py39:
|
|
119
|
+
docker:
|
|
120
|
+
- image: cimg/python:3.9
|
|
121
|
+
steps: *DEFAULT_STEPS
|
|
122
|
+
|
|
123
|
+
py311:
|
|
124
|
+
docker:
|
|
125
|
+
- image: cimg/python:3.11
|
|
126
|
+
steps: *DEFAULT_STEPS
|
|
127
|
+
|
|
128
|
+
py312:
|
|
129
|
+
docker:
|
|
130
|
+
- image: cimg/python:3.12
|
|
131
|
+
steps: *DEFAULT_STEPS
|
|
132
|
+
|
|
133
|
+
sonarcloud:
|
|
134
|
+
docker:
|
|
135
|
+
- image: cimg/openjdk:21.0
|
|
136
|
+
steps:
|
|
137
|
+
- checkout
|
|
138
|
+
- attach_workspace:
|
|
139
|
+
at: workspace
|
|
140
|
+
- run:
|
|
141
|
+
name: Setup environment variables
|
|
142
|
+
command: |
|
|
143
|
+
echo "SONAR_SCANNER_VERSION=4.5.0.2216" >> $BASH_ENV
|
|
144
|
+
echo \
|
|
145
|
+
'SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION' \
|
|
146
|
+
>> $BASH_ENV
|
|
147
|
+
- run:
|
|
148
|
+
name: Install sonar scanner
|
|
149
|
+
command: |
|
|
150
|
+
rm -rf $SONAR_SCANNER_HOME
|
|
151
|
+
mkdir -p $SONAR_SCANNER_HOME
|
|
152
|
+
curl \
|
|
153
|
+
-sSLo \
|
|
154
|
+
$HOME/.sonar/sonar-scanner.zip \
|
|
155
|
+
https://repo1.maven.org/maven2/org/sonarsource/scanner/cli/sonar-scanner-cli/$SONAR_SCANNER_VERSION/sonar-scanner-cli-$SONAR_SCANNER_VERSION.zip
|
|
156
|
+
unzip $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
|
|
157
|
+
rm $HOME/.sonar/sonar-scanner.zip
|
|
158
|
+
- run:
|
|
159
|
+
name: Run sonar scanner
|
|
160
|
+
command: |
|
|
161
|
+
export PATH=$SONAR_SCANNER_HOME/bin:$PATH
|
|
162
|
+
export SONAR_SCANNER_OPTS="-server"
|
|
163
|
+
sonar-scanner \
|
|
164
|
+
-Dsonar.login=$SONAR_AUTH_TOKEN \
|
|
165
|
+
-Dsonar.branch.name=$CIRCLE_BRANCH
|
|
166
|
+
|
|
167
|
+
pypi:
|
|
168
|
+
docker:
|
|
169
|
+
- image: cimg/python:3.10
|
|
170
|
+
steps:
|
|
171
|
+
- checkout
|
|
172
|
+
- run: *CREATE_VIRTUALENV_STEP
|
|
173
|
+
- run: *INSTALL_DEPENDENCIES_STEP
|
|
174
|
+
- run:
|
|
175
|
+
name: Install build dependencies
|
|
176
|
+
command: |
|
|
177
|
+
. venv/bin/activate
|
|
178
|
+
pip install build twine
|
|
179
|
+
- run:
|
|
180
|
+
name: Build packages
|
|
181
|
+
command: |
|
|
182
|
+
. venv/bin/activate
|
|
183
|
+
python -m build
|
|
184
|
+
- run:
|
|
185
|
+
name: Upload package to pypi
|
|
186
|
+
command: |
|
|
187
|
+
. venv/bin/activate
|
|
188
|
+
twine upload --username __token__ --disable-progress-bar dist/*
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
end_of_line = lf
|
|
6
|
+
insert_final_newline = true
|
|
7
|
+
trim_trailing_whitespace = true
|
|
8
|
+
max_line_length = 100
|
|
9
|
+
|
|
10
|
+
[{*.py,*.rst,tox.ini}]
|
|
11
|
+
indent_style = space
|
|
12
|
+
indent_size = 4
|
|
13
|
+
|
|
14
|
+
[{*.yml,*.yaml,.yamllint}]
|
|
15
|
+
indent_style = space
|
|
16
|
+
indent_size = 2
|
|
17
|
+
|
|
18
|
+
[Makefile]
|
|
19
|
+
indent_style = tab
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
|
3
|
+
# package ecosystems to update and where the package manifests are located.
|
|
4
|
+
# Please see the documentation for all configuration options:
|
|
5
|
+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
6
|
+
|
|
7
|
+
version: 2
|
|
8
|
+
updates:
|
|
9
|
+
- package-ecosystem: "pip" # See documentation for possible values
|
|
10
|
+
directory: "/requirements/" # Location of package manifests
|
|
11
|
+
target-branch: next-release
|
|
12
|
+
schedule:
|
|
13
|
+
interval: "weekly"
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
name: ReleaseNotice
|
|
2
|
+
on:
|
|
3
|
+
release:
|
|
4
|
+
types: [published]
|
|
5
|
+
workflow_dispatch:
|
|
6
|
+
jobs:
|
|
7
|
+
build:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
# To check the github context
|
|
11
|
+
- name: Dump Github context
|
|
12
|
+
env:
|
|
13
|
+
GITHUB_CONTEXT: ${{ toJSON(github) }}
|
|
14
|
+
run: echo "$GITHUB_CONTEXT"
|
|
15
|
+
- name: Slack Notification on SUCCESS
|
|
16
|
+
if: success()
|
|
17
|
+
uses: tokorom/action-slack-incoming-webhook@main
|
|
18
|
+
env:
|
|
19
|
+
INCOMING_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
20
|
+
with:
|
|
21
|
+
text: A release is published.
|
|
22
|
+
blocks: |
|
|
23
|
+
[
|
|
24
|
+
{
|
|
25
|
+
"type": "header",
|
|
26
|
+
"text": {
|
|
27
|
+
"type": "plain_text",
|
|
28
|
+
"text": "GreyNoise SDK ${{ github.event.release.tag_name}} is published!"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"type": "section",
|
|
33
|
+
"text": {
|
|
34
|
+
"type": "mrkdwn",
|
|
35
|
+
"text": "*Author:*\n${{ github.actor }}"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "section",
|
|
40
|
+
"text": {
|
|
41
|
+
"type": "mrkdwn",
|
|
42
|
+
"text": "*Information:*"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "section",
|
|
47
|
+
"text": {
|
|
48
|
+
"type": "mrkdwn",
|
|
49
|
+
"text": ${{ toJSON(github.event.release.body) }}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "section",
|
|
54
|
+
"text": {
|
|
55
|
+
"type": "mrkdwn",
|
|
56
|
+
"text": "${{ github.event.release.html_url }}"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
]
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
*.swp
|
|
7
|
+
|
|
8
|
+
# C extensions
|
|
9
|
+
*.so
|
|
10
|
+
|
|
11
|
+
# Distribution / packaging
|
|
12
|
+
.Python
|
|
13
|
+
env/
|
|
14
|
+
build/
|
|
15
|
+
develop-eggs/
|
|
16
|
+
dist/
|
|
17
|
+
downloads/
|
|
18
|
+
eggs/
|
|
19
|
+
.eggs/
|
|
20
|
+
lib/
|
|
21
|
+
lib64/
|
|
22
|
+
parts/
|
|
23
|
+
sdist/
|
|
24
|
+
var/
|
|
25
|
+
wheels/
|
|
26
|
+
*.egg-info/
|
|
27
|
+
.installed.cfg
|
|
28
|
+
*.egg
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
.hypothesis/
|
|
50
|
+
|
|
51
|
+
# Translations
|
|
52
|
+
*.mo
|
|
53
|
+
*.pot
|
|
54
|
+
|
|
55
|
+
# Django stuff:
|
|
56
|
+
*.log
|
|
57
|
+
local_settings.py
|
|
58
|
+
|
|
59
|
+
# Flask stuff:
|
|
60
|
+
instance/
|
|
61
|
+
.webassets-cache
|
|
62
|
+
|
|
63
|
+
# Scrapy stuff:
|
|
64
|
+
.scrapy
|
|
65
|
+
|
|
66
|
+
# Sphinx documentation
|
|
67
|
+
docs/_build/
|
|
68
|
+
|
|
69
|
+
# PyBuilder
|
|
70
|
+
target/
|
|
71
|
+
|
|
72
|
+
# Jupyter Notebook
|
|
73
|
+
.ipynb_checkpoints
|
|
74
|
+
|
|
75
|
+
# pyenv
|
|
76
|
+
.python-version
|
|
77
|
+
|
|
78
|
+
# celery beat schedule file
|
|
79
|
+
celerybeat-schedule
|
|
80
|
+
|
|
81
|
+
# SageMath parsed files
|
|
82
|
+
*.sage.py
|
|
83
|
+
|
|
84
|
+
# dotenv
|
|
85
|
+
.env
|
|
86
|
+
|
|
87
|
+
# virtualenv
|
|
88
|
+
.venv
|
|
89
|
+
venv/
|
|
90
|
+
venv_py2/
|
|
91
|
+
venv3/
|
|
92
|
+
ENV/
|
|
93
|
+
bin/
|
|
94
|
+
pyvenv.cfg
|
|
95
|
+
|
|
96
|
+
# Spyder project settings
|
|
97
|
+
.spyderproject
|
|
98
|
+
.spyproject
|
|
99
|
+
|
|
100
|
+
# Rope project settings
|
|
101
|
+
.ropeproject
|
|
102
|
+
|
|
103
|
+
# mkdocs documentation
|
|
104
|
+
/site
|
|
105
|
+
|
|
106
|
+
# mypy
|
|
107
|
+
.mypy_cache/
|
|
108
|
+
|
|
109
|
+
# idea
|
|
110
|
+
.idea/
|
|
111
|
+
workspace/
|
|
112
|
+
|
|
113
|
+
.DS_Store
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
repos:
|
|
3
|
+
- repo: local
|
|
4
|
+
hooks:
|
|
5
|
+
- id: yamllint
|
|
6
|
+
name: Style check (yamllint)
|
|
7
|
+
entry: yamllint
|
|
8
|
+
language: system
|
|
9
|
+
types:
|
|
10
|
+
- yaml
|
|
11
|
+
- id: black
|
|
12
|
+
name: Style check (black)
|
|
13
|
+
entry: black
|
|
14
|
+
language: system
|
|
15
|
+
types:
|
|
16
|
+
- python
|
|
17
|
+
- id: isort
|
|
18
|
+
name: Style check (isort)
|
|
19
|
+
entry: isort
|
|
20
|
+
language: system
|
|
21
|
+
types:
|
|
22
|
+
- python
|
|
23
|
+
- id: flake8
|
|
24
|
+
name: Static analysis (flake8)
|
|
25
|
+
entry: flake8
|
|
26
|
+
language: system
|
|
27
|
+
types:
|
|
28
|
+
- python
|
|
29
|
+
- repo: https://github.com/adrienverge/yamllint.git
|
|
30
|
+
rev: v1.17.0
|
|
31
|
+
hooks:
|
|
32
|
+
- id: yamllint
|
|
33
|
+
language: system
|
|
34
|
+
args: [-c=.yamllint]
|
|
@@ -2,6 +2,43 @@
|
|
|
2
2
|
Changelog
|
|
3
3
|
=========
|
|
4
4
|
|
|
5
|
+
Version `3.0.0`_
|
|
6
|
+
================
|
|
7
|
+
**Date**: June 02, 2025
|
|
8
|
+
|
|
9
|
+
* BREAKING CHANGES:
|
|
10
|
+
|
|
11
|
+
* The `riot` command is deprecated and will be removed in a future version.
|
|
12
|
+
Please use `ip` command instead.
|
|
13
|
+
* Removed support for Python 3.6 and 3.7
|
|
14
|
+
* Many schema changes to the API responses for the `ip`, `ip-multi`, and
|
|
15
|
+
`query` commands
|
|
16
|
+
* Updated API endpoints to v3 for `ip`, `ip-multi`, `quick`, and `query` commands
|
|
17
|
+
* Updated Python version requirements to support Python 3.8 through 3.12
|
|
18
|
+
* SDK now uses `api_config` object to initialize the API client
|
|
19
|
+
* Use modern packaging metadata with pyproject.toml instead of setup.cfg
|
|
20
|
+
|
|
21
|
+
* API client:
|
|
22
|
+
|
|
23
|
+
* Update `ip`, `ip-multi`, `quick`, and `query` commands to use new v3 endpoints
|
|
24
|
+
* Update `ip`, `ip-multi`, `quick`, and `query` commands to return `business_service_intelligence` and
|
|
25
|
+
`internet_scanner_intelligence` attributes
|
|
26
|
+
* Added thread support for multi-lookup requests
|
|
27
|
+
* Added `api_config` object to initialize the API client
|
|
28
|
+
|
|
29
|
+
* CLI:
|
|
30
|
+
|
|
31
|
+
* Update `ip`, `ip-multi`, `quick`, and `query` commands to support new attributes
|
|
32
|
+
|
|
33
|
+
* Dependencies:
|
|
34
|
+
|
|
35
|
+
* Updated `Click` to version 8.1.8
|
|
36
|
+
* Updated `cachetools` to version 5.5.2
|
|
37
|
+
* Updated `dict2xml` to version 1.7.6
|
|
38
|
+
* Updated `jinja2` to version 3.1.6
|
|
39
|
+
* Updated `more-itertools` to version 10.7.0
|
|
40
|
+
* Updated `six` to version 1.17.0
|
|
41
|
+
|
|
5
42
|
Version `2.3.0`_
|
|
6
43
|
================
|
|
7
44
|
**Date**: July 30, 2024
|
|
@@ -429,4 +466,5 @@ Version `0.2.0`_
|
|
|
429
466
|
.. _`2.0.1`: https://github.com/GreyNoise-Intelligence/pygreynoise/compare/v2.0.0...2.0.1
|
|
430
467
|
.. _`2.1.0`: https://github.com/GreyNoise-Intelligence/pygreynoise/compare/v2.0.1...2.1.0
|
|
431
468
|
.. _`2.2.0`: https://github.com/GreyNoise-Intelligence/pygreynoise/compare/v2.1.0...2.2.0
|
|
432
|
-
.. _`2.3.0`: https://github.com/GreyNoise-Intelligence/pygreynoise/compare/v2.2.0...
|
|
469
|
+
.. _`2.3.0`: https://github.com/GreyNoise-Intelligence/pygreynoise/compare/v2.2.0...2.3.0
|
|
470
|
+
.. _`3.0.0`: https://github.com/GreyNoise-Intelligence/pygreynoise/compare/v2.3.0...HEAD
|
greynoise-3.0.0/Makefile
ADDED
|
File without changes
|
greynoise-3.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: greynoise
|
|
3
|
+
Version: 3.0.0
|
|
4
|
+
Summary: Abstraction to interact with GreyNoise API.
|
|
5
|
+
Project-URL: Homepage, https://greynoise.io/
|
|
6
|
+
Project-URL: Repository, https://github.com/GreyNoise-Intelligence/pygreynoise
|
|
7
|
+
Project-URL: Documentation, https://greynoise.io/
|
|
8
|
+
Author-email: GreyNoise Intelligence <support@greynoise.io>
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: internet,scanning,security,threat intelligence
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Natural Language :: English
|
|
16
|
+
Classifier: Programming Language :: Python
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
24
|
+
Requires-Python: >=3.8
|
|
25
|
+
Requires-Dist: ansimarkup
|
|
26
|
+
Requires-Dist: cachetools
|
|
27
|
+
Requires-Dist: click-default-group
|
|
28
|
+
Requires-Dist: click-repl
|
|
29
|
+
Requires-Dist: click<=8.1.8
|
|
30
|
+
Requires-Dist: colorama
|
|
31
|
+
Requires-Dist: dict2xml
|
|
32
|
+
Requires-Dist: jinja2
|
|
33
|
+
Requires-Dist: more-itertools>=8.14.0
|
|
34
|
+
Requires-Dist: requests
|
|
35
|
+
Requires-Dist: six
|
|
36
|
+
Description-Content-Type: text/x-rst
|
|
37
|
+
|
|
38
|
+
================
|
|
39
|
+
Python GreyNoise
|
|
40
|
+
================
|
|
41
|
+
|
|
42
|
+
.. image:: https://circleci.com/gh/GreyNoise-Intelligence/pygreynoise.svg?style=shield
|
|
43
|
+
:target: https://circleci.com/gh/GreyNoise-Intelligence/pygreynoise
|
|
44
|
+
|
|
45
|
+
.. image:: https://sonarcloud.io/api/project_badges/measure?project=GreyNoise-Intelligence_pygreynoise&metric=coverage
|
|
46
|
+
:target: https://sonarcloud.io/dashboard?id=GreyNoise-Intelligence_pygreynoise
|
|
47
|
+
|
|
48
|
+
.. image:: https://readthedocs.org/projects/greynoise/badge/?version=latest
|
|
49
|
+
:target: http://greynoise.readthedocs.io/en/latest/?badge=latest
|
|
50
|
+
|
|
51
|
+
.. image:: https://badge.fury.io/py/greynoise.svg
|
|
52
|
+
:target: https://badge.fury.io/py/greynoise
|
|
53
|
+
|
|
54
|
+
.. image:: https://img.shields.io/badge/License-MIT-yellow.svg
|
|
55
|
+
:target: https://opensource.org/licenses/MIT
|
|
56
|
+
|
|
57
|
+
.. image:: https://quay.io/repository/greynoiseintel/pygreynoise/status
|
|
58
|
+
:target: https://quay.io/repository/greynoiseintel/pygreynoise
|
|
59
|
+
|
|
60
|
+
This is an abstract python library built on top of the `GreyNoise`_ service. It is preferred that users use this library when implementing integrations or plan to use GreyNoise within their code. The library includes a small client to interact with the API.
|
|
61
|
+
|
|
62
|
+
.. _GreyNoise: https://greynoise.io/
|
|
63
|
+
|
|
64
|
+
Documentation
|
|
65
|
+
=============
|
|
66
|
+
Documentation is available here: `Documentation`_
|
|
67
|
+
|
|
68
|
+
.. _Documentation: https://developer.greynoise.io/docs/libraries-sample-code
|
|
69
|
+
|
|
70
|
+
Quick Start
|
|
71
|
+
===========
|
|
72
|
+
**Install the library**:
|
|
73
|
+
|
|
74
|
+
``pip install greynoise`` or ``python setup.py install``
|
|
75
|
+
|
|
76
|
+
**Save your configuration**:
|
|
77
|
+
|
|
78
|
+
``greynoise setup --api-key <your-API-key>``
|
|
79
|
+
|
|
80
|
+
Versioning
|
|
81
|
+
==========
|
|
82
|
+
This python package follows semantic versioning. According to this:
|
|
83
|
+
|
|
84
|
+
* We will NEVER push a breaking change without a major version release.
|
|
85
|
+
* We will only add new features and/or bug fixes with minor version releases.
|
|
86
|
+
* We will only do bug fixes for patch version release.
|
|
87
|
+
|
|
88
|
+
As such, we recommend you pin the dependency on this SDK to only allow minor version changes at most:
|
|
89
|
+
|
|
90
|
+
::
|
|
91
|
+
|
|
92
|
+
# allow patch version increments
|
|
93
|
+
greynoise~=1.4.0
|
|
94
|
+
|
|
95
|
+
# allow minor version increments
|
|
96
|
+
greynoise~=1.4
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
Usage
|
|
100
|
+
=====
|
|
101
|
+
::
|
|
102
|
+
|
|
103
|
+
Usage: greynoise [OPTIONS] COMMAND [ARGS]...
|
|
104
|
+
|
|
105
|
+
GreyNoise CLI.
|
|
106
|
+
|
|
107
|
+
Options:
|
|
108
|
+
-h, --help Show this message and exit.
|
|
109
|
+
|
|
110
|
+
Commands:
|
|
111
|
+
account View information about your GreyNoise account.
|
|
112
|
+
alerts List, create, delete, and manage your GreyNoise alerts.
|
|
113
|
+
analyze Analyze the IP addresses in a log file, stdin, etc.
|
|
114
|
+
feedback Send feedback directly to the GreyNoise team.
|
|
115
|
+
filter Filter the noise from a log file, stdin, etc.
|
|
116
|
+
help Show this message and exit.
|
|
117
|
+
interesting Report one or more IP addresses as "interesting".
|
|
118
|
+
ip Query GreyNoise for all information on a given IP.
|
|
119
|
+
ip-multi Perform Context lookup for multiple IPs at once.
|
|
120
|
+
query Run a GNQL (GreyNoise Query Language) query.
|
|
121
|
+
quick Quickly check whether or not one or many IPs are "noise".
|
|
122
|
+
repl Start an interactive shell.
|
|
123
|
+
riot Query GreyNoise IP to see if it is in the RIOT dataset.
|
|
124
|
+
setup Configure API key.
|
|
125
|
+
signature Submit an IDS signature to GreyNoise to be deployed to...
|
|
126
|
+
similar Query GreyNoise IP to identify Similar IPs.
|
|
127
|
+
stats Get aggregate stats from a given GNQL query.
|
|
128
|
+
timeline Query GreyNoise IP to identify Similar IPs.
|
|
129
|
+
timelinehourly Query GreyNoise IP to identify Similar IPs.
|
|
130
|
+
version Get version and OS information for your GreyNoise...
|
|
131
|
+
|
|
132
|
+
|