kkamagi's story

IT, 정보보안, 포렌식, 일상 공유

Programming

web log 수집

까마기 2018. 5. 1. 21:20
728x90
반응형

import redis


r = redis.StrictRedis(host='localhost', port=6379, db=0)

cnt = 1


with open("웹로그 access file", 'r') as f:


        logs = f.readlines()

        for log in logs:

                log = log.split()

                url = log[15]

                r.set(url, cnt)

                cnt = cnt+1



                print(url)

        print('--------------------')



반응형