-
Notifications
You must be signed in to change notification settings - Fork 0
/
check_datas.py
25 lines (17 loc) · 961 Bytes
/
check_datas.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# import from python
from os import path, mkdir
import typing
def check_directories() -> str:
if not path.isdir("datas"): mkdir("datas", 0o755)
if not path.isdir("results"): mkdir("results", 0o755)
return "datas/", "results/"
def check_sources_ases(source:str)->bool:
return path.isfile( source )
def check_sources_path(fr:str, all:str, dump:str) -> bool:
return path.isfile( fr ), path.isfile( all ), path.isfile( dump )
def check_sources_hijack(source:str, all:str ) -> bool:
return path.isfile( source ), path.isfile( all )
def check_sources_ip( dump:str) -> bool:
return path.isfile( "results/AS.json"), path.isfile( "results/AS_FR.json"), path.isfile( dump )
def check_sources() -> bool:
return path.isfile( "results/AS.json"), path.isfile( "results/AS_FR.json"), path.isfile( "datas/dump.txt" ), path.isfile( "datas/autnums.html" ), path.isfile( "datas/all.hijacks.json" ), path.isfile( "results/links_AS_fr.cvs" )