コード例 #1
0
ファイル: upload.py プロジェクト: tdr130/passive-dns
def main():
    for f in os.listdir(LOC):
        f = os.path.join(LOC, f)
        if not os.path.exists(f):  #file disappeared
            continue
        if '.pcap' not in f:
            continue

        if os.path.exists(next_filename(f)) or not is_growing(f):
            print 'upload', f
            print upload(f)
コード例 #2
0
ファイル: upload.py プロジェクト: JustinAzoff/passive-dns
def main():
    for f in os.listdir(LOC):
        f = os.path.join(LOC, f)
        if not os.path.exists(f): #file disappeared
            continue
        if '.pcap' not in f:
            continue

        if os.path.exists(next_filename(f)) or not is_growing(f):
            print 'upload', f
            print upload(f)
コード例 #3
0
ファイル: process.py プロジェクト: tdr130/passive-dns
def main():
    for d in answer_dir, query_dir:
        make_dir(d)

    work_done = False

    for f in os.listdir(LOC):
        f = os.path.join(LOC, f)
        if not os.path.exists(f):  #file disappeared
            continue
        if 'processing' in f or 'pcap' not in f: continue

        if os.path.exists(next_filename(f)) or not is_growing(f):
            process(f)
            work_done = True

    if work_done:
        client.SearchClient().reopen_files()
コード例 #4
0
ファイル: process.py プロジェクト: JustinAzoff/passive-dns
def main():
    for d in answer_dir, query_dir:
        make_dir(d)

    work_done = False


    for f in os.listdir(LOC):
        f = os.path.join(LOC, f)
        if not os.path.exists(f): #file disappeared
            continue
        if 'processing' in f or 'pcap' not in f: continue

        if os.path.exists(next_filename(f)) or not is_growing(f):
            process(f)
            work_done = True

    if work_done:
        client.SearchClient().reopen_files()