예제 #1
0
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
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
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
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()