Your IP : 172.28.240.42


Current Path : /var/www/html/clients/e-nkama.ru/
Upload File :
Current File : /var/www/html/clients/e-nkama.ru/find_bot_files.py

from __future__ import print_function
import fnmatch
import os
import re
import json


count = 0


def main():
    global count
    path = '/var/www/html/clients/e-nkama.ru/e-nkama_bitrix'
    normal_file_names = [
        '1',
        '2020',
        '404',
        'a',
        'add',
        'feed',
    ]
    for root, dirnames, filenames in os.walk(path):
        for filename in fnmatch.filter(filenames, '*.php'):
            count += 1
            #print(count, end='\r')
            curr_name = filename.split('.')[-2]
            try:
                int(curr_name, 16)
                if curr_name not in normal_file_names:
                    print(root + '\\' + filename)
            except ValueError:
                pass
    print()

if __name__ == '__main__':
    main()