Created
October 21, 2024 03:15
-
-
Save zeroxia/5c64f6e7ab92b971b71b650e20393831 to your computer and use it in GitHub Desktop.
Revisions
-
zeroxia created this gist
Oct 21, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ #!/usr/bin/env python3 import logging import ctypes def init_logger(): logging_config = { "format": "%(asctime)s %(levelname)-7s %(filename)s:%(lineno)-4d %(funcName)s -- %(message)s", "datefmt": "%m-%d_%H:%M:%S", "level": logging.INFO } logging.basicConfig(**logging_config) init_logger() def main(): libc = ctypes.CDLL('libc.so.6') print(libc) out = libc.time(None) logging.info("type: {}".format(type(out))) logging.info("value: {}".format(out)) if __name__ == '__main__': main()