예제 #1
0
    def id_by_echoprint(self, file):
        
        from ep.API import fp
        from lib.analyzer.echoprint import Echoprint
        e = Echoprint()
        code, version, duration, echoprint = e.echoprint_from_path(file.path, offset=10, duration=100)
        
        
        # print code
        # code = fp.decode_code_string(code)

        try:
            res = fp.best_match_for_query(code_string=code)
            
            print 'ECHOPRINT!!!!!!!!!!'
            
            print 'TRID'
            print res.TRID
            print 'END TRID'
            
            if res.match():
            
                print res.message()
                print res.match()
                print res.score
                print res.TRID
                #ids = [int(res.TRID),]
                
                return int(res.TRID)
            
        except Exception, e:
            print e
            pass
예제 #2
0
    def id_by_echoprint(self, file):
        
        from ep.API import fp
        from lib.analyzer.echoprint import Echoprint
        e = Echoprint()
        code, version, duration, echoprint = e.echoprint_from_path(file.path, offset=10, duration=100)
        
        
        # print code
        # code = fp.decode_code_string(code)

        try:
            res = fp.best_match_for_query(code_string=code)
            
            print 'ECHOPRINT!!!!!!!!!!'
            
            print 'TRID'
            print res.TRID
            print 'END TRID'
            
            if res.match():
            
                print res.message()
                print res.match()
                print res.score
                print res.TRID
                #ids = [int(res.TRID),]
                
                return int(res.TRID)
            
        except Exception, e:
            print e
            pass
예제 #3
0
 def echoprint(self):
     
     from lib.analyzer.echoprint import Echoprint
     e = Echoprint()
     code, version, duration, echoprint = e.echoprint_from_path(self.sample.path)
     res = e.get_by_echoprintfp(code, version)
     
     self.echoprintfp = echoprint
     return res
예제 #4
0
    def echoprint(self):

        from lib.analyzer.echoprint import Echoprint
        e = Echoprint()
        code, version, duration, echoprint = e.echoprint_from_path(
            self.sample.path)
        res = e.get_by_echoprintfp(code, version)

        self.echoprintfp = echoprint
        return res
예제 #5
0
    def id_by_echoprint(self, file):


        from ep.API import fp
        from lib.analyzer.echoprint import Echoprint
        e = Echoprint()
        code, version, duration, echoprint = e.echoprint_from_path(file.path, offset=10, duration=100)

        try:
            res = fp.best_match_for_query(code_string=code)

            if res.match():
                log.info('echoprint match - score: %s trid: %s' % (res.score, res.TRID))
                #print res.message()
                #print res.match()
                #print res.score
                #print res.TRID
                return int(res.TRID)
            
        except Exception, e:
            log.warning('echoprint error: %s' % (e))