mirror of https://github.com/CIRCL/AIL-framework
fix: [test api] typo
parent
3c36c9c8eb
commit
fa133ce12c
|
@ -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
|
#### 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
|
##### ``api/get/crawler/domain/`` POST
|
||||||
|
|
||||||
### Check if a tor/regular domain have been crawled
|
### 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
|
### Get domain tags
|
||||||
##### ``api/get/crawler/domain/tag/ <domain><port>`` GET
|
##### ``api/get/crawler/domain/tag/ <domain><port>`` POST
|
||||||
|
|
||||||
### Get domain history
|
### Get domain history
|
||||||
##### ``api/get/crawler/domain/history/ <domain><port>`` GET
|
##### ``api/get/crawler/domain/history/ <domain><port>`` POST
|
||||||
|
|
||||||
### Get domain list of items
|
### 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
|
##### ``api/get/decoded`` POST
|
||||||
|
|
||||||
### Check if a decoded item exists (via sha1)
|
### Check if a decoded item exists (via sha1)
|
||||||
##### ``api/get/decoded/exist/<sha1>`` GET
|
##### ``api/get/decoded/exist/<sha1>`` POST
|
||||||
|
|
||||||
### Get decoded item metadata
|
### Get decoded item metadata
|
||||||
### Check if a decoded item exists (via sha1)
|
### 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)
|
### 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
|
##### ``api/get/cryptocurrency`` POST
|
||||||
|
|
||||||
### Check if a cryptocurrency address (bitcoin, ..) exists
|
### 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
|
### 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
|
return res_json
|
||||||
|
|
||||||
def get_api_key():
|
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 = f.read()
|
||||||
content = content.splitline()
|
content = content.splitlines()
|
||||||
apikey = content[-1]
|
apikey = content[-1]
|
||||||
apikey = apikey.replace('API_Key=', '', 1)
|
apikey = apikey.replace('API_Key=', '', 1)
|
||||||
|
return apikey
|
||||||
|
|
||||||
|
APIKEY = get_api_key()
|
||||||
|
|
||||||
class TestApiV1(unittest.TestCase):
|
class TestApiV1(unittest.TestCase):
|
||||||
import_uuid = None
|
import_uuid = None
|
||||||
item_id = None
|
item_id = None
|
||||||
|
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.app = app
|
self.app = app
|
||||||
self.app.config['TESTING'] = True
|
self.app.config['TESTING'] = True
|
||||||
self.client = self.app.test_client()
|
self.client = self.app.test_client()
|
||||||
self.apikey = get_api_key()
|
self.apikey = APIKEY
|
||||||
self.item_content = "text to import"
|
self.item_content = "text to import"
|
||||||
self.item_tags = ["infoleak:analyst-detection=\"private-key\""]
|
self.item_tags = ["infoleak:analyst-detection=\"private-key\""]
|
||||||
self.expected_tags = ["infoleak:analyst-detection=\"private-key\"", 'infoleak:submission="manual"']
|
self.expected_tags = ["infoleak:analyst-detection=\"private-key\"", 'infoleak:submission="manual"']
|
||||||
|
|
|
@ -115,8 +115,7 @@ try:
|
||||||
toIgnoreModule.add(line)
|
toIgnoreModule.add(line)
|
||||||
|
|
||||||
except IOError:
|
except IOError:
|
||||||
f = open(os.path.join(Flask_dir, 'templates', 'ignored_modules.txt'), 'w')
|
pass
|
||||||
f.close()
|
|
||||||
|
|
||||||
# Dynamically import routes and functions from modules
|
# Dynamically import routes and functions from modules
|
||||||
# Also, prepare header.html
|
# Also, prepare header.html
|
||||||
|
|
Loading…
Reference in New Issue