merged temporal functionality
This commit is contained in:
parent
e7265937e3
commit
f846c0e8ae
7 changed files with 84 additions and 99 deletions
14
randonautentropy/temporal.py
Normal file
14
randonautentropy/temporal.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import os
|
||||
import shutil
|
||||
from subprocess import check_output as exec
|
||||
from .install import install
|
||||
|
||||
def get(length=10, channel=0):
|
||||
length *= 2
|
||||
module_path = os.path.abspath(os.path.dirname(__file__))
|
||||
temporal_path = os.path.abspath(f"{module_path}/temporal")
|
||||
exe_path = f'{temporal_path}/result/{os.uname().sysname}/temporal'
|
||||
if shutil.which('temporal') is None:
|
||||
install()
|
||||
temporal = exec(f'temporal hexdump {channel} {length}', shell=True)
|
||||
return temporal[:-1].decode('UTF-8')
|
||||
Loading…
Add table
Add a link
Reference in a new issue