mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 00:28:22 +00:00
fix: [test api] typo
This commit is contained in:
parent
3c36c9c8eb
commit
fa133ce12c
3 changed files with 18 additions and 15 deletions
|
@ -660,7 +660,7 @@ curl https://127.0.0.1:7000/api/v1/import/item --header "Authorization: iHc1_ChZ
|
|||
|
||||
|
||||
|
||||
### GET Import item info: `api/v1/import/item/<uuid4>`
|
||||
### GET Import item info: `api/v1/get/import/item/`
|
||||
|
||||
#### Description
|
||||
|
||||
|
@ -751,16 +751,16 @@ curl -k https://127.0.0.1:7000/api/v1/get/import/item --header "Authorization: i
|
|||
##### ``api/get/crawler/domain/`` POST
|
||||
|
||||
### Check if a tor/regular domain have been crawled
|
||||
##### ``api/get/crawler/domain/metadata/ <domain><port>`` GET
|
||||
##### ``api/get/crawler/domain/metadata/ <domain><port>`` POST
|
||||
|
||||
### Get domain tags
|
||||
##### ``api/get/crawler/domain/tag/ <domain><port>`` GET
|
||||
##### ``api/get/crawler/domain/tag/ <domain><port>`` POST
|
||||
|
||||
### Get domain history
|
||||
##### ``api/get/crawler/domain/history/ <domain><port>`` GET
|
||||
##### ``api/get/crawler/domain/history/ <domain><port>`` POST
|
||||
|
||||
### Get domain list of items
|
||||
##### ``api/get/crawler/domain/item/ <domain><port>`` GET
|
||||
##### ``api/get/crawler/domain/item/ <domain><port>`` POST
|
||||
|
||||
-----
|
||||
|
||||
|
@ -773,14 +773,14 @@ curl -k https://127.0.0.1:7000/api/v1/get/import/item --header "Authorization: i
|
|||
##### ``api/get/decoded`` POST
|
||||
|
||||
### Check if a decoded item exists (via sha1)
|
||||
##### ``api/get/decoded/exist/<sha1>`` GET
|
||||
##### ``api/get/decoded/exist/<sha1>`` POST
|
||||
|
||||
### Get decoded item metadata
|
||||
### Check if a decoded item exists (via sha1)
|
||||
##### ``api/get/decoded/metadata/<sha1>`` GET
|
||||
##### ``api/get/decoded/metadata/<sha1>`` POST
|
||||
|
||||
### Get decoded item correlation (1 depth)
|
||||
##### ``api/get/decoded/metadata/<sha1>`` GET
|
||||
##### ``api/get/decoded/metadata/<sha1>`` POST
|
||||
|
||||
-----
|
||||
|
||||
|
@ -789,10 +789,10 @@ curl -k https://127.0.0.1:7000/api/v1/get/import/item --header "Authorization: i
|
|||
##### ``api/get/cryptocurrency`` POST
|
||||
|
||||
### Check if a cryptocurrency address (bitcoin, ..) exists
|
||||
##### ``api/get/cryptocurrency/exist/<bitcoin_address>`` GET
|
||||
##### ``api/get/cryptocurrency/exist/<bitcoin_address>`` POST
|
||||
|
||||
### Get cryptocurrency address metadata
|
||||
##### ``api/get/cryptocurrency/metadata/<bitcoin_address>`` GET
|
||||
##### ``api/get/cryptocurrency/metadata/<bitcoin_address>`` POST
|
||||
|
||||
-----
|
||||
|
||||
|
|
|
@ -23,21 +23,25 @@ def parse_response(obj, ail_response):
|
|||
return res_json
|
||||
|
||||
def get_api_key():
|
||||
with open(os.path.join(os.environ['AIL_HOME'], 'DEFAULT_PASSWORD'). 'r') as f:
|
||||
with open(os.path.join(os.environ['AIL_HOME'], 'DEFAULT_PASSWORD'), 'r') as f:
|
||||
content = f.read()
|
||||
content = content.splitline()
|
||||
content = content.splitlines()
|
||||
apikey = content[-1]
|
||||
apikey = apikey.replace('API_Key=', '', 1)
|
||||
return apikey
|
||||
|
||||
APIKEY = get_api_key()
|
||||
|
||||
class TestApiV1(unittest.TestCase):
|
||||
import_uuid = None
|
||||
item_id = None
|
||||
|
||||
|
||||
def setUp(self):
|
||||
self.app = app
|
||||
self.app.config['TESTING'] = True
|
||||
self.client = self.app.test_client()
|
||||
self.apikey = get_api_key()
|
||||
self.apikey = APIKEY
|
||||
self.item_content = "text to import"
|
||||
self.item_tags = ["infoleak:analyst-detection=\"private-key\""]
|
||||
self.expected_tags = ["infoleak:analyst-detection=\"private-key\"", 'infoleak:submission="manual"']
|
||||
|
|
|
@ -115,8 +115,7 @@ try:
|
|||
toIgnoreModule.add(line)
|
||||
|
||||
except IOError:
|
||||
f = open(os.path.join(Flask_dir, 'templates', 'ignored_modules.txt'), 'w')
|
||||
f.close()
|
||||
pass
|
||||
|
||||
# Dynamically import routes and functions from modules
|
||||
# Also, prepare header.html
|
||||
|
|
Loading…
Reference in a new issue