def nsat_checksum_http_cmd(args): match = nsat.checksums_http( (args.host, args.port), path=args.path, timeout=args.timeout, verbose=not args.quiet, ) for line in lines(args): expr = nsat.parse(line.strip()) for ass in nsat.solve_checksum(expr, match, args.parallel): print ass
def nsat_checksum_cmd(args): match = nsat.checksums for line in lines(args): expr = nsat.parse(line.strip()) for ass in nsat.solve_checksum(expr, match, args.parallel): print ass
def nsat_contraint_cmd(args): for line in lines(args): expr = nsat.parse(line.strip()) for ass in nsat.solve_constraint(expr): print ass
def test_nsat_checksum_http(raw, host, ipt_rst_drop_rule): expr = nsat.parse(raw) expected = nsat_fixtures[raw] match = nsat.checksums_http(host) actual = normalize(nsat.solve_checksum(expr, match, parallel=True)) assert expected == actual
def test_nsat_checksum(raw): expr = nsat.parse(raw) expected = nsat_fixtures[raw] actual = normalize(nsat.solve_checksum(expr, nsat.checksums)) assert expected == actual
def test_nsat_constraint(raw, ipt_rst_drop_rule): expr = nsat.parse(raw) expected = nsat_fixtures[raw] actual = normalize(nsat.solve_constraint(expr)) assert expected == actual