Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump {down,up}load-artifact from v2 to v4 #258

Merged
merged 4 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
run: tar cf masscanned.tar target/debug/masscanned

- name: Upload binary
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: masscanned.tar
path: masscanned.tar
Expand All @@ -68,7 +68,7 @@ jobs:
uses: actions/checkout@v2

- name: Get binary
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: masscanned.tar

Expand Down
30 changes: 20 additions & 10 deletions test/src/tests/dns.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,22 @@ def test_ipv4_udp_dns_in_a():
check_ip_checksum(resp)
assert UDP in resp, "no UDP layer found"
udp = resp[UDP]
assert udp.sport == dport, "unexpected UDP sport: {}".format(udp.sport)
assert udp.dport == sport, "unexpected UDP dport: {}".format(udp.dport)
assert (
udp.sport == dport
), f"unexpected UDP sport: {udp.sport!r} ({domain})"
assert (
udp.dport == sport
), f"unexpected UDP dport: {udp.dport!r} ({domain})"
if DNS not in udp:
try:
dns_rep = DNS(udp.load)
except Exception:
raise AssertionError("no DNS layer found")
else:
dns_rep = udp[DNS]
assert dns_rep.id == 1234, f"unexpected id value: {dns_rep.id}"
assert (
dns_rep.id == 1234
), f"unexpected id value: {dns_rep.id!r} ({domain})"
assert dns_rep.qr, "unexpected qr value"
assert dns_rep.opcode == 0, "unexpected opcode value"
assert dns_rep.aa, "unexpected aa value"
Expand All @@ -62,7 +68,9 @@ def test_ipv4_udp_dns_in_a():
assert not dns_rep.ra, "unexpected ra value"
assert dns_rep.z == 0, "unexpected z value"
assert dns_rep.rcode == 0, "unexpected rcode value"
assert dns_rep.qdcount == 1, "unexpected qdcount value"
assert (
dns_rep.qdcount == 1
), f"unexpected qdcount value: {dns_rep.qdcount!r} vs 1 ({domain})"
assert dns_rep.ancount == 1, "unexpected ancount value"
assert dns_rep.nscount == 0, "unexpected nscount value"
assert dns_rep.arcount == 0, "unexpected arcount value"
Expand Down Expand Up @@ -90,11 +98,11 @@ def test_ipv4_udp_dns_in_a_multiple_queries():
dports = [53, 5353, 80, 161, 24732]
for sport in sports:
for dport in dports:
qd = (
DNSQR(qname="www.example1.com", qtype="A", qclass="IN")
/ DNSQR(qname="www.example2.com", qtype="A", qclass="IN")
/ DNSQR(qname="www.example3.com", qtype="A", qclass="IN")
)
qd = [
DNSQR(qname="www.example1.com", qtype="A", qclass="IN"),
DNSQR(qname="www.example2.com", qtype="A", qclass="IN"),
DNSQR(qname="www.example3.com", qtype="A", qclass="IN"),
]
dns_req = DNS(id=1234, rd=False, opcode=0, qd=qd)
req = (
Ether(dst=MAC_ADDR)
Expand Down Expand Up @@ -125,7 +133,9 @@ def test_ipv4_udp_dns_in_a_multiple_queries():
assert not dns_rep.ra, "unexpected ra value"
assert dns_rep.z == 0, "unexpected z value"
assert dns_rep.rcode == 0, "unexpected rcode value"
assert dns_rep.qdcount == 3, "unexpected qdcount value"
assert (
dns_rep.qdcount == 3
), f"unexpected qdcount value: {dns_rep.qdcount} vs 3"
assert dns_rep.ancount == 3, "unexpected ancount value"
assert dns_rep.nscount == 0, "unexpected nscount value"
assert dns_rep.arcount == 0, "unexpected arcount value"
Expand Down
Loading