mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-24 15:51:03 +02:00
eagleeye: future patches
This commit is contained in:
parent
53b34d4c73
commit
d96a04ab11
2 changed files with 36 additions and 0 deletions
24
app-forensics/eagleeye/files/config.diff
Normal file
24
app-forensics/eagleeye/files/config.diff
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
--- config.py.orig 2021-12-25 10:13:31.964568836 +0800
|
||||
+++ config.py 2021-12-25 11:37:55.228288771 +0800
|
||||
@@ -3,6 +3,7 @@
|
||||
import sys
|
||||
import tempfile
|
||||
from selenium import webdriver
|
||||
+from selenium.webdriver.firefox.options import Options
|
||||
|
||||
with open('./config.json') as json_data:
|
||||
cfg = json.load(json_data)
|
||||
@@ -42,7 +43,12 @@
|
||||
profile.set_preference('browser.helperApps.neverAsk.saveToDisk', 'text/csv')
|
||||
profile.set_preference("browser.link.open_newwindow", 3)
|
||||
profile.set_preference("browser.link.open_newwindow.restriction", 2)
|
||||
- return webdriver.Firefox(profile)
|
||||
+
|
||||
+ options = Options()
|
||||
+ options.binary_location = '/usr/bin/firefox-bin'
|
||||
+# options.add_argument('--headless')
|
||||
+
|
||||
+ return webdriver.Firefox(profile, log_path='/dev/null', firefox_options=options)
|
||||
else:
|
||||
os.environ["webdriver.chrome.driver"] = cfg['WEBDRIVER']['PATH']
|
||||
return webdriver.Chrome()
|
||||
12
app-forensics/eagleeye/files/report.diff
Normal file
12
app-forensics/eagleeye/files/report.diff
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
34c34
|
||||
< with open('tmp.html', 'w') as t:
|
||||
---
|
||||
> with open('/tmp/tmp.html', 'w') as t:
|
||||
36,38c36,38
|
||||
< doc = HTML('tmp.html')
|
||||
< doc.write_pdf('{0}_Report.pdf'.format(name))
|
||||
< os.remove('tmp.html')
|
||||
---
|
||||
> doc = HTML('/tmp/tmp.html')
|
||||
> doc.write_pdf('/tmp/{0}_Report.pdf'.format(name))
|
||||
> os.remove('/tmp/tmp.html')
|
||||
Loading…
Reference in a new issue