Skip to content

Commit 1d21e02

Browse files
committed
A few linting and docs tweaks
1 parent 8975c61 commit 1d21e02

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

.travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ install:
2424
- pip install pytest
2525
- pip install -e .
2626
script:
27+
- wget https://raw.githubusercontent.com/kevthehermit/PasteHunter/master/settings.json.sample -O ~/.config/pastehunter.json
2728
- pastehunter-cli
28-
- pytest
29+
- python -m pytest
2930
after_success:
3031
- python setup.py sdist
3132
deploy:

README.md

-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ PasteHunter is a python3 application that is designed to query a collection of s
33
For all the pastes it finds it scans the raw contents against a series of Yara rules looking for information that can be used
44
by an organisation or a researcher.
55

6-
## Pastebin API Deprecated
7-
8-
We are aware that the pastebin scraping API has been deprectated and are reviewing.
9-
106

117
## Setup
128
For setup instructions please see the official documentation https://pastehunter.readthedocs.io/en/latest/installation.html

conftest.py

-2
This file was deleted.

docs/inputs.rst

+6
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ Slexy has some heavy rate limits (30 requests per 30 seconds), but may still ret
6363
- **api_raw**: The URL endpoint for the raw paste.
6464
- **api_view**: The URL enpoint to view the paste.
6565

66+
ix.io
67+
---------
68+
69+
ix.io is a smaller site used primarily for console/command line pastes.
70+
71+
- **store_all**: Store all pastes regardless of a rule match.
6672

6773
StackExchange
6874
-------------

pastehunter/inputs/ixio.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import logging
22
import re
33
from datetime import datetime
4-
from time import sleep
5-
from typing import List, Any, Dict, Union
6-
7-
import requests
4+
from typing import List, Any, Dict, Union, Pattern
85

96
from common import base62_decode, base62_encode
107
from inputs.base_input import BasePasteSite
@@ -18,7 +15,7 @@ class IxDotIoSite(BasePasteSite):
1815
# Capturing groups:
1916
# 1. Paste ID
2017
# 2. Timestamp
21-
_ITEM_ID_RE: re.Pattern = re.compile('<div class="t">[\\sa-zA-Z0-9]+'
18+
_ITEM_ID_RE: Pattern = re.compile('<div class="t">[\\sa-zA-Z0-9]+'
2219
'<a href="/(.*?)">\\[r][^\r\n]+'
2320
'\\s+@ (.*?)[\r\n]')
2421

test/test_base62.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
from common import base62_decode, base62_encode
1+
from pastehunter.common import base62_decode, base62_encode
2+
23

34
def test_b62_encode():
45
assert base62_encode(622708) == '2BZG'
56
assert base62_encode(622707) == '2BZF'
67

8+
79
def test_b62_decode():
810
assert base62_decode('1') == 1
911
assert base62_decode('a') == 10

test/test_paste_objects.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from inputs import slexy
21
from inputs.pastebin import PastebinPasteSite
32
from inputs.slexy import SlexyPasteSite
43

5-
64
pids_found = []
5+
6+
77
def mock_get_paste_for_pid(pid):
88
pids_found.append(pid)
99
return "pid_is_" + pid

0 commit comments

Comments
 (0)