[sleuthkit-users] Autopsy ingest module - Getting home path in jython
Brought to you by:
carrier
|
From: Sylvain P. <syl...@gm...> - 2015-06-10 12:15:56
|
Hi,
I would like to know how to have home path in jython.
I tried this code in my ingest module :
---------
import os
home = os.curdir
if 'HOME' in os.environ:
home = os.environ['HOME']
elif os.name == 'posix':
home = os.path.expanduser("~/")
elif os.name == 'nt':
if 'HOMEPATH' in os.environ and 'HOMEDRIVE' in os.environ:
home = os.environ['HOMEDRIVE'] + os.environ['HOMEPATH']
else:
home = os.environ['HOMEPATH']
-----------
But when I run the ingest module in Autopsy, it crash.
Indeed, after some tests, it seems that the module plant from the "import
os"
Yet this seems to be used in the official jython documentation :
http://www.jython.org/docs/library/os.html
Have you an idea of what to use ?
Thanks
|