Skip to content

Commit

Permalink
Fix to allow loading signatures from a different location
Browse files Browse the repository at this point in the history
  • Loading branch information
Thiago Marques authored and Thiago Marques committed Oct 11, 2018
1 parent ec129c8 commit 721da55
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
9 changes: 8 additions & 1 deletion die_source/console/mainc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,14 @@ int main(int argc, char *argv[])

SingleFileScan sfs;

// sfs.setOptions(&options);
sfs.setDataBase(SingleFileScan::options.sDataBasePath);

bInvalidBase=(SingleFileScan::options.listBinaryScripts.count()==0)
&&(SingleFileScan::options.listELFScripts.count()==0)
&&(SingleFileScan::options.listMACHScripts.count()==0)
&&(SingleFileScan::options.listMSDOSScripts.count()==0)
&&(SingleFileScan::options.listPEScripts.count()==0)
&&(SingleFileScan::options.listTextScripts.count()==0);

for(int i=0; i<listFiles.count(); i++)
{
Expand Down
16 changes: 4 additions & 12 deletions die_source/singlefilescan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,20 +126,12 @@ void SingleFileScan::setDataBase(QString sDataBase)
sDataBase=__DefaultDataBasePath;
}

if(options.sDataBasePath!=sDataBase)
{
options.sDataBasePath=sDataBase;
Scan::die_loadScripts(&options);
options.sDataBasePath=sDataBase;
Scan::die_loadScripts(&options);
#ifdef QT_DEBUG
qDebug("New database: %s",sDataBase.toLatin1().data());
qDebug("New database: %s",sDataBase.toLatin1().data());
#endif
}
else
{
#ifdef QT_DEBUG
qDebug("old database: %s",options.sDataBasePath.toLatin1().data());
#endif
}

}

__DIE_OPTIONS SingleFileScan::options={};
Expand Down

0 comments on commit 721da55

Please sign in to comment.