<commit_before># Copyright (c) 2013-2016 Quarkslab.
# This file is part of IRMA project.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License in the top-level directory
# of this distribution and at:
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# No part of the project, including this file, may be copied,
# modified, propagated, or distributed except according to the
# terms contained in the LICENSE file.

import unittest
import os
import re
from irmacl.helpers import probe_list, scan_new, scan_add_files, scan_get, \
    scan_launch, scan_proberesults
import time
import logging

logging.getLogger("requests").setLevel(logging.WARNING)
SCAN_TIMEOUT_SEC = 3000
BEFORE_NEXT_PROGRESS = 5
DEBUG = False
cwd = os.path.abspath(__file__)
EICAR_FILE = "samples/eicar.com"
EICAR_HASH = '275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f'
MAXTIME_SLOW_PROBE = 60
MAXTIME_NORMAL_PROBE = 30
MAXTIME_FAST_PROBE = 10
NOT_CHECKED = "This value is not checked"
EICAR_RESULTS = [
    {"status": 1,
     "name": "AVG AntiVirus Free (Linux)",
     "results": "EICAR_Test",
     "version": "13.0.3114",
     "duration": MAXTIME_NORMAL_PROBE,
     "type": "antivirus"
     },
    {"status": 1,
     "name": "Avast Core Security (Linux)",
     "results": "EICAR Test-NOT virus!!!",
     "version": "2.1.1",
     "duration": MAXTIME_NORMAL_PROBE,
     "type": "antivirus"
     },
    {"status": 1,
     "name": "Bitdefender Antivirus Scanner (Linux)",
     "results": "EICAR-Test-File \(not a virus\)",
     "version": "7.141118",
     "duration": MAXTIME_NORMAL_PROBE,
     "type": "antivirus"
     },
    {"status": 1,
     "name": "Clam AntiVirus Scanner (Linux)",
     "results": "Eicar-Test-Signature",
     "version": "0.99.2",
     "duration": MAXTIME_NORMAL_PROBE,
     "type": "antivirus"
     },
    {"status": 1,
     "name": "Comodo Antivirus (Linux)",
     "results": "Malware",
     "version": "1.1.268025.1",
     "duration": MAXTIME_NORMAL_PROBE,
     "type": "antivirus"
     },
    {"status": 1,
     "name": "DrWeb Antivirus (Linux)",
     "results": "EICAR Test File \(NOT a Virus!\)",
     "version": "10.1.0.1.1507091917",
     "duration": MAXTIME_SLOW_PROBE,
     "type": "antivirus"
     },
    {"status": 1,
     "name": "Emsisoft Commandline Scanner (Windows)",
     "results": "EICAR-Test-File \(not a virus\) \(B\)",
     "version": "10.0.0.5366",
     "duration": MAXTIME_FAST_PROBE,
     "type": "antivirus"
     },
    {"status": 1,
     "name": "eScan Antivirus (Linux)",
     "results": "EICAR-Test-File \(not a virus\)\(DB\)",
     "version": "7.0-18",
     "duration": MAXTIME_NORMAL_PROBE,
     "type": "antivirus"
     },
    {"status": 1,<commit_msg>Bump Emsisoft version<commit_after># Copyright (c) 2013-2016 Quarkslab.
# This file is part of IRMA project.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License in the top-level directory
# of this distribution and at:
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# No part of the project, including this file, may be copied,
# modified, propagated, or distributed except according to the
# terms contained in the LICENSE file.

import unittest
import os
import re
from irmacl.helpers import probe_list, scan_new, scan_add_files, scan_get, \
    scan_launch, scan_proberesults
import time
import logging

logging.getLogger("requests").setLevel(logging.WARNING)
SCAN_TIMEOUT_SEC = 3000
BEFORE_NEXT_PROGRESS = 5
DEBUG = False
cwd = os.path.abspath(__file__)
EICAR_FILE = "samples/eicar.com"
EICAR_HASH = '275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f'
MAXTIME_SLOW_PROBE = 60
MAXTIME_NORMAL_PROBE = 30
MAXTIME_FAST_PROBE = 10
NOT_CHECKED = "This value is not checked"
EICAR_RESULTS = [
    {"status": 1,
     "name": "AVG AntiVirus Free (Linux)",
     "results": "EICAR_Test",
     "version": "13.0.3114",
     "duration": MAXTIME_NORMAL_PROBE,
     "type": "antivirus"
     },
    {"status": 1,
     "name": "Avast Core Security (Linux)",
     "results": "EICAR Test-NOT virus!!!",
     "version": "2.1.1",
     "duration": MAXTIME_NORMAL_PROBE,
     "type": "antivirus"
     },
    {"status": 1,
     "name": "Bitdefender Antivirus Scanner (Linux)",
     "results": "EICAR-Test-File \(not a virus\)",
     "version": "7.141118",
     "duration": MAXTIME_NORMAL_PROBE,
     "type": "antivirus"
     },
    {"status": 1,
     "name": "Clam AntiVirus Scanner (Linux)",
     "results": "Eicar-Test-Signature",
     "version": "0.99.2",
     "duration": MAXTIME_NORMAL_PROBE,
     "type": "antivirus"
     },
    {"status": 1,
     "name": "Comodo Antivirus (Linux)",
     "results": "Malware",
     "version": "1.1.268025.1",
     "duration": MAXTIME_NORMAL_PROBE,
     "type": "antivirus"
     },
    {"status": 1,
     "name": "DrWeb Antivirus (Linux)",
     "results": "EICAR Test File \(NOT a Virus!\)",
     "version": "10.1.0.1.1507091917",
     "duration": MAXTIME_SLOW_PROBE,
     "type": "antivirus"
     },
    {"status": 1,
     "name": "Emsisoft Commandline Scanner (Windows)",
     "results": "EICAR-Test-File \(not a virus\) \(B\)",
     "version": "12.2.0.7060",
     "duration": MAXTIME_FAST_PROBE,
     "type": "antivirus"
     },
    {"status": 1,
     "name": "eScan Antivirus (Linux)",
     "results": "EICAR-Test-File \(not a virus\)\(DB\)",
     "version": "7.0-18",
     "duration": MAXTIME_NORMAL_PROBE,
     "type": "antivirus"
     },
    {"status": 1,
{'fraction_non_alphanumeric': 0.15436479772888573, 'fraction_numerical': 0.045067423704755145, 'mean_word_length': 3.407349491790461, 'pattern_counts': {'":': 98, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7289357', 'n_tokens_mistral': 2187, 'n_tokens_neox': 2014, 'n_words': 515}