Skip to content

Commit

Permalink
Various bug fixes. Windows port bug fixes.
Browse files Browse the repository at this point in the history
darcs-hash:20090512042821-f1522-170009b22840d80875d023eab40a22843cb3038a.gz
  • Loading branch information
scudette committed May 12, 2009
1 parent 9d49fd7 commit 82e231e
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/FileFormats/HTML.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,8 @@ def resolve_reference(self, reference, hint='', build_reference=True):
else:
fsfd = FileSystem.DBFS(self.case)
new_reference = decode_entity(url_unquote(reference))
url = posixpath.normpath(posixpath.join(self.base_url, new_reference))
url = posixpath.normpath(posixpath.join(posixpath.dirname(self.base_url),
new_reference))
try:
path, inode, inode_id = fsfd.lookup(path = url)
if inode_id:
Expand Down
2 changes: 2 additions & 0 deletions src/mailtools/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
include $(top_srcdir)/config/Makefile.rules

if !HAVE_WINDOWS
bin_PROGRAMS = readpst
endif
noinst_HEADERS = libpst.h libstrfunc.h timeconv.h common.h vbuf.h lzfu.h

readpst_SOURCES = libpst.c timeconv.c libstrfunc.c timeconv.h common.h \
Expand Down
4 changes: 4 additions & 0 deletions src/mailtools/timeconv.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
#include <time.h>
#include "common.h"

#ifdef __WIN32__
#include <windows.h>
#endif

time_t fileTimeToUnixTime( const FILETIME *filetime, DWORD *remainder );
char * fileTimeToAscii (const FILETIME *filetime);

Expand Down
2 changes: 2 additions & 0 deletions src/plugins/DiskForensics/FileHandlers/RegScan.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
from format import Buffer
from pyflag.ColumnTypes import StringType, TimestampType, InodeType

active = False

class RegEventHandler(FlagFramework.EventHandler):
def create(self, dbh, case):
dbh.execute("""CREATE TABLE if not exists `reg` (
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/DiskForensics/HashComparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def __init__(self,fsfd):
class Scan(BaseScanner):
def __init__(self, inode,ddfs,outer,factories=None,fd=None):
BaseScanner.__init__(self, inode,ddfs,outer,factories, fd=fd)
self.m = md5.new()
self.m = md5()
self.type = None
self.length = 0
self.ignore = False
Expand Down
5 changes: 4 additions & 1 deletion src/plugins/Tests/unicode.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ def tree_cb(path):

class UnicodeTest(pyflag.tests.ScannerTest):
""" Test Unicode handling """
test_case = "PyFlagTestCase"
test_case = "PyFlagUnicodeTestCase"
test_file = "unicode.E01"
subsystem = "EWF"

def test01LoadScanner(self):
""" Tests loading of Unicode image """
3 changes: 2 additions & 1 deletion src/pyflag/Farm.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,8 @@ def start_workers():
## seems that on windows argvs are not processed correctly
## because the below array ends up as a single command line
## string WTF? This is very dodgy...
os.spawnv(os.P_NOWAIT, interpreter, [interpreter, '"%s"' % __file__] + sys.argv[1:])
os.spawnv(os.P_NOWAIT, interpreter, ['"%s"' % interpreter,
'"%s"' % __file__] + sys.argv[1:])
pid = 1

## Parents:
Expand Down
1 change: 1 addition & 0 deletions src/pyflag/FlagFramework.py
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,7 @@ def print_info():
("Case Tables", "CASE_TABLES"),
("Magic Handlers", "MAGIC_HANDLERS"),
("Carvers", "CARVERS"),
("Hexeditor Actions", "ACTIONS"),
):
result += "\n%s:\n%s\n" % (heading, '-' * len(heading))
registry = getattr(Registry, registry)
Expand Down
6 changes: 5 additions & 1 deletion src/pyflag/ScannerUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ def fill_in_dependancies(scanners):

def find_dependencies(scanner, dependancies):
""" Fills in scanner's dependancies in dependancies """
cls = Registry.SCANNERS.dispatch(scanner)
try:
cls = Registry.SCANNERS.dispatch(scanner)
except ValueError:
return

if type(cls.depends)==type(''):
depends = [cls.depends]
else:
Expand Down
4 changes: 3 additions & 1 deletion src/pyflag/UI.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,9 @@ def render(self, query, result):
for e in self.elements:
if e.name==self.groupby:
new_query = query.clone()
del new_query['callback_stored']
del new_query['groupby']
del new_query['order']
filter_expression = self.filter_str.strip().replace('%','%%')
if filter_expression: filter_expression += " and "

Expand All @@ -556,7 +558,7 @@ def render(self, query, result):
new_query['__target__'] = self.filter
new_query.clear('limit')
e.link = new_query
e.link_pane = 'pane'
e.link_pane = 'parent'

from pyflag.ColumnTypes import CounterType

Expand Down
3 changes: 2 additions & 1 deletion src/regtools/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
include $(top_srcdir)/config/Makefile.rules

if !HAVE_WINDOWS
bin_PROGRAMS = reglookup

nodist_pkgpyexec_PYTHON = pyregistry$(PYTHON_EXTENSION)
endif

noinst_LTLIBRARIES = libreg.la pyregistry.la

Expand Down

0 comments on commit 82e231e

Please sign in to comment.