#!/usr/bin/env python

"""
 NAME
     htonl,  htons,  ntohl,  ntohs - convert values between host and network
     byte order
"""
from ctypes import cdll

libc = cdll.LoadLibrary("libc.so.6")
ntohl = libc.ntohl

answer = ntohl(0x6C)
print(answer, hex(answer))

b232192304106df7e8113159729806d074959e69
<mask token>

<mask token>
print(answer, hex(answer))

<mask token>
libc = cdll.LoadLibrary('libc.so.6')
ntohl = libc.ntohl
answer = ntohl(108)
print(answer, hex(answer))

<mask token>
from ctypes import cdll
libc = cdll.LoadLibrary('libc.so.6')
ntohl = libc.ntohl
answer = ntohl(108)
print(answer, hex(answer))

#!/usr/bin/env python

"""
 NAME
     htonl,  htons,  ntohl,  ntohs - convert values between host and network
     byte order
"""
from ctypes import cdll

libc = cdll.LoadLibrary("libc.so.6")
ntohl = libc.ntohl

answer = ntohl(0x6C)
print(answer, hex(answer))
