<s> '''<STR_LIT>''' <EOL> """<STR_LIT>""" <EOL> import sys , os , subprocess , time , os . path <EOL> sys . path . insert ( <NUM_LIT:1> , os . path . join ( "<STR_LIT:..>" ) ) <EOL> sys . path . insert ( <NUM_LIT:1> , os . path . join ( "<STR_LIT:..>" , "<STR_LIT>" ) ) <EOL> import libinit <EOL> from optparse import OptionParser <EOL> import probedb . standalone <EOL> import probedb . probedata2 . models as ProbeData <EOL> import probedb . scanner . models as Scanner <EOL> import threading <EOL> import socket <EOL> from tlslite import TLSConnection , HandshakeSettings <EOL> options_config = OptionParser ( ) <EOL> options_config . add_option ( "<STR_LIT>" , action = "<STR_LIT:store>" , type = "<STR_LIT:int>" , dest = "<STR_LIT>" , default = <NUM_LIT:0> ) <EOL> options_config . add_option ( "<STR_LIT>" , action = "<STR_LIT:store_true>" , dest = "<STR_LIT>" ) <EOL> options_config . add_option ( "<STR_LIT>" , action = "<STR_LIT:store>" , type = "<STR_LIT:string>" , dest = "<STR_LIT>" , default = "<STR_LIT>" ) <EOL> ( options , args ) = options_config . parse_args ( ) <EOL> run = Scanner . ScannerRun . objects . get ( id = options . run_id ) <EOL> import csv <EOL> file = csv . writer ( open ( options . output_filename , "<STR_LIT:wb>" ) ) <EOL> i = <NUM_LIT:0> <EOL> for item in run . scannerresults_set . all ( ) . iterator ( ) : <EOL> i += <NUM_LIT:1> <EOL> file . writerow ( [ i , item . server , item . port , item . protocol ] ) <EOL> if i % <NUM_LIT:100> == <NUM_LIT:0> : <EOL> print i </s>
