示例#1
0
import re
from subprocess import call
import sys
import time

from inception import cfg, util, terminal
from inception.exceptions import InceptionException


term = terminal.Terminal()

# Error handling for cases where libforensic1394 is not installed in /usr/lib
try:
    from forensic1394.bus import Bus
except OSError:
    host_os = util.detectos()
    try:
        path = os.environ['LD_LIBRARY_PATH']
    except KeyError:
        path = ''
    # If the host OS is Linux, we may need to set LD_LIBRARY_PATH to make
    # python find the libs
    if host_os == cfg.LINUX and '/usr/local/lib' not in path:
        os.putenv('LD_LIBRARY_PATH', "/usr/local/lib")
        util.restart()
    else:
        raise InceptionException('Could not load libforensic1394, please make '
                                 'sure that libforensic1394 is in your PATH')

# List of FireWire OUIs
OUI = {}
示例#2
0
@author: Carsten Maartmann-Moe <*****@*****.**> aka ntropy <*****@*****.**>
'''
import re
from inception.util import info, separator, fail, open_file, restart, detectos,\
    warn, poll, BeachBall
from inception import cfg
import sys
import os
import time
from subprocess import call

# Error handling for cases where libforensic1394 is not installed in /usr/lib
try:
    from forensic1394.bus import Bus
except OSError:
    host_os = detectos()
    try:
        path = os.environ['LD_LIBRARY_PATH']
    except KeyError:
        path = ''
    # If the host OS is Linux, we may need to set LD_LIBRARY_PATH to make python
    # find the libs
    if host_os == cfg.LINUX and '/usr/local/lib' not in path:
        os.putenv('LD_LIBRARY_PATH', "/usr/local/lib")
        restart()
    else:
        fail('Could not load libforensic1394')

# List of FireWire OUIs
OUI = {}
示例#3
0
@author: Carsten Maartmann-Moe <*****@*****.**> aka ntropy <*****@*****.**>
'''
import re
from inception.util import info, separator, fail, open_file, restart, detectos,\
    warn, poll, BeachBall
from inception import cfg
import sys
import os
import time
from subprocess import call

# Error handling for cases where libforensic1394 is not installed in /usr/lib
try:
    from forensic1394.bus import Bus
except OSError:
    host_os = detectos()
    try:
        path = os.environ['LD_LIBRARY_PATH']
    except KeyError:
        path = ''
    # If the host OS is Linux, we may need to set LD_LIBRARY_PATH to make python
    # find the libs
    if host_os == cfg.LINUX and '/usr/local/lib' not in path:
        os.putenv('LD_LIBRARY_PATH', "/usr/local/lib")
        restart()
    else:
        fail('Could not load libforensic1394')

# List of FireWire OUIs
OUI = {}
示例#4
0
Created on Jan 23, 2012

@author: Carsten Maartmann-Moe <*****@*****.**> aka ntropy <*****@*****.**>
'''
from inception import cfg, util, term
from subprocess import call
import os
import re
import sys
import time

# Error handling for cases where libforensic1394 is not installed in /usr/lib
try:
    from forensic1394.bus import Bus
except OSError:
    host_os = util.detectos()
    try:
        path = os.environ['LD_LIBRARY_PATH']
    except KeyError:
        path = ''
    # If the host OS is Linux, we may need to set LD_LIBRARY_PATH to make python
    # find the libs
    if host_os == cfg.LINUX and '/usr/local/lib' not in path:
        os.putenv('LD_LIBRARY_PATH', "/usr/local/lib")
        util.restart()
    else:
        term.fail('Could not load libforensic1394')

# List of FireWire OUIs
OUI = {}