Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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()
Exemplo n.º 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()