Ejemplo n.º 1
0
    def get_fsm(self, sample_id):
        """
        Return a FSM representation taking in consideration 1-gram sequence
        """
        fsm = FSM()

        for thread_id, total in self.get_stats_for(sample_id):
            sfrom = 'start'

            for num, caller in self.foreach_syscall(sample_id, thread_id):
                fsm.add(sfrom, num, num)
                sfrom = num

        fsm.start('start')
        return fsm
Ejemplo n.º 2
0
    def get_fsm(self, sample_id):
        """
        Return a FSM representation taking in consideration 1-gram sequence
        """
        fsm = FSM()

        for thread_id, total in self.get_stats_for(sample_id):
            sfrom = 'start'

            for num, caller in self.foreach_syscall(sample_id, thread_id):
                fsm.add(sfrom, num, num)
                sfrom = num

        fsm.start('start')
        return fsm