Skip to content

Commit

Permalink
Remove AddressFamily. prefix from address_family (#1316)
Browse files Browse the repository at this point in the history
* Remove `AddressFamily.` prefix from address_family

* Fix python 2 regression

Co-authored-by: Arusekk <arek_koz@o2.pl>
  • Loading branch information
FelixMartel and Arusekk committed Jan 7, 2020
1 parent 2124f36 commit 6d340bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pwnlib/util/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,4 @@ def sockaddr(host, port, network = 'ipv4'):
sockaddr += p32(0xffffffff) # Save three bytes 'push -1' vs 'push 0'
sockaddr += host
length = len(sockaddr) + 4 # Save five bytes 'push 0'
return (sockaddr, length, address_family)
return (sockaddr, length, getattr(address_family, "name", address_family))

0 comments on commit 6d340bf

Please sign in to comment.