示例#1
0
void FromFileModule::loadFormatDetections(Program &formatDetections, StandardFormatDetector::Adder &formatAdder)
{
    for(Program formatDetection: formatDetections)
    {
        switch(formatDetection.node(0).payload().toInteger())
        {
            case HMC_ADD_MAGIC_NUMBER_OP:
                formatAdder.addMagicNumber(formatDetection.node(1).payload().toString());
                break;

            case HMC_ADD_EXTENSION_OP:
                formatAdder.addExtension(formatDetection.node(1).payload().toString());
                break;

            case HMC_ADD_SYNCBYTE_OP:
                formatAdder.addSyncbyte(formatDetection.node(1).payload().toInteger(), formatDetection.node(2).payload().toInteger());
                break;

            default:
                break;
        }
    }
}
示例#2
0
void HmcModule::addFormatDetection(StandardFormatDetector::Adder &formatAdder)
{
    formatAdder.addMagicNumber("1a 45 df a3 xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx 68 65 78 61 6d 6f 6e 6b 65 79");
    formatAdder.addExtension("hmc");
}