core.py: move some initialized value back so we got more flexibality

This commit is contained in:
xwings
2020-05-12 21:11:49 +08:00
parent 70e2d74d5f
commit 3aee31cb1e
2 changed files with 13 additions and 4 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ Qemu usermode does similar thing to our emulator, that is to emulate whole execu
---
#### Installation
Please see [setup guide](https://docs.qiling.io/) file for how to install Qiling Framework.
Please see [setup guide](https://docs.qiling.io/en/latest/getting_started/) file for how to install Qiling Framework.
---
+12 -3
View File
@@ -34,6 +34,9 @@ class Qiling(QLCoreStructs, QLCoreHooks, QLCoreUtils):
verbose=1,
profile=None,
console=True,
log_dir=None,
log_split=None,
append=None,
libcache = False,
stdin=0,
stdout=0,
@@ -55,6 +58,9 @@ class Qiling(QLCoreStructs, QLCoreHooks, QLCoreUtils):
self.verbose = verbose
self.profile = profile
self.console = console
self.log_dir = log_dir
self.log_split = log_split
self.append = append
self.libcache = libcache
self.stdin = stdin
self.stdout = stdout
@@ -116,9 +122,12 @@ class Qiling(QLCoreStructs, QLCoreHooks, QLCoreUtils):
# setup #
############
self.profile = self.profile_setup()
self.append = self.profile["MISC"]["append"]
self.log_dir = self.profile["LOG"]["dir"]
self.log_split = self.profile.getboolean('LOG', 'split')
if self.append == None:
self.append = self.profile["MISC"]["append"]
if self.log_dir == None:
self.log_dir = self.profile["LOG"]["dir"]
if self.log_split == None:
self.log_split = self.profile.getboolean('LOG', 'split')
# Log's configuration
if self.log_dir != "" and type(self.log_dir) == str: