Module Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ClassDef bases body FunctionDef arguments args NameParam defaults kwarg body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Str Assign AttributeStore NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Str Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad If CompareEq AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr orelse If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr IfExp AttributeLoad NameLoad attr Str Str IfExp AttributeLoad NameLoad attr Str Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Assign AttributeStore NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr IfExp BoolOpAnd AttributeLoad NameLoad attr UnaryOpNot AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Num Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num If BoolOpAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Num AugAssignAdd NameStore Call AttributeLoad NameLoad attr Str NameLoad AugAssignAdd NameStore Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad AugAssignAdd NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Num Assign ListStore NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Num Assign NameStore Num While CompareNotEq NameLoad Num body Assign ListStore NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Num Assign ListStore NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Num If CompareNotEq NameLoad Num body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad BinOpAdd BinOpPow Num Num Num Str Assign ListStore NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareNotEq NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Return Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign NameStore IfExp AttributeLoad NameLoad attr Num Num AugAssignAdd NameStore Call AttributeLoad NameLoad attr Str NameLoad AugAssignAdd NameStore BinOpMult Call NameLoad Num IfExp BinOpBitAnd NameLoad Num Num Num Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If NameLoad body Return Assign NameStore Call Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad While NameLoad body Expr Call AttributeLoad NameLoad attr Num TryExcept body Assign ListStore NameStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad NameLoad attr body Continue If CompareNotIn NameLoad TupleLoad Num Num Num body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad BinOpAdd BinOpPow Num Num Num Str Continue If CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Num AugAssignAdd NameStore Call AttributeLoad NameLoad attr Str Num AugAssignAdd NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse If CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Num AugAssignAdd NameStore Call AttributeLoad NameLoad attr Str Num AugAssignAdd NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr NameLoad Return decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListLoad While NameLoad body TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword TupleLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr If BoolOpAnd AttributeLoad NameLoad attr UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword NameLoad handlers ExceptHandler type NameLoad body Expr Call NameLoad AttributeLoad NameLoad attr NameLoad Return decorator_list decorator_list
N/A N/A logging N/A socket N/A struct N/A threading N/A sys N/A os N/A io N/A writes pypxe helpers NBD N/A N/A __init__ N/A N/A self N/A server_settings N/A N/A N/A self bd N/A N/A server_settings get block_device N/A N/A self netboot_directory N/A N/A server_settings get netboot_directory . N/A N/A self write N/A N/A server_settings get write False N/A N/A self cow N/A N/A server_settings get cow True N/A N/A self in_mem N/A N/A server_settings get in_mem False N/A N/A self copy_to_ram N/A N/A server_settings get copy_to_ram False N/A N/A self ip N/A N/A server_settings get ip 0.0.0.0 N/A N/A self port N/A int N/A N/A server_settings get port 10809 N/A N/A self mode_debug N/A N/A server_settings get mode_debug False N/A N/A self mode_verbose N/A N/A server_settings get mode_verbose False N/A N/A self logger N/A N/A server_settings get logger None N/A N/A N/A self logger None N/A N/A N/A self logger N/A N/A logging getLogger NBD N/A handler N/A N/A logging StreamHandler N/A formatter N/A N/A logging Formatter %(asctime)s %(name)s [%(levelname)s] %(message)s N/A N/A N/A handler setFormatter formatter N/A N/A N/A N/A self logger addHandler handler N/A N/A self mode_debug N/A N/A N/A N/A N/A self logger setLevel N/A logging DEBUG N/A N/A N/A self mode_verbose N/A N/A N/A N/A N/A self logger setLevel N/A logging INFO N/A N/A N/A N/A N/A self logger setLevel N/A logging WARN N/A N/A N/A N/A self logger debug NOTICE: NBD server started in debug mode. NBD server is using the following: N/A N/A N/A N/A self logger info N/A N/A Server IP: {0} format N/A self ip N/A N/A N/A N/A self logger info N/A N/A Server Port: {0} format N/A self port N/A N/A N/A N/A self logger info N/A N/A Block Device: {0} format N/A self bd N/A N/A N/A N/A self logger info N/A N/A Block Device Writes: {0} format N/A self write N/A N/A N/A N/A self logger info N/A N/A Block Write Method: {0} ({1}) format N/A N/A self cow Copy-On-Write File N/A N/A self in_mem Memory Disk N/A N/A self sock N/A N/A socket socket N/A socket AF_INET N/A socket SOCK_STREAM N/A N/A N/A N/A self sock setsockopt N/A socket SOL_SOCKET N/A socket SO_REUSEADDR 1 N/A N/A N/A N/A self sock bind N/A N/A self ip N/A self port N/A N/A N/A N/A self sock listen 4 N/A N/A self openbd N/A open N/A N/A helpers normalize_path N/A self netboot_directory N/A self bd N/A N/A N/A self write N/A N/A self cow r+b rb N/A N/A N/A N/A self openbd seek 0 2 N/A N/A self bdsize N/A N/A N/A self openbd tell N/A N/A N/A N/A self openbd seek 0 N/A N/A N/A self copy_to_ram N/A self cow N/A N/A N/A N/A N/A self logger info N/A N/A Starting copying {0} to RAM format N/A self bd N/A N/A self openbd N/A N/A io BytesIO N/A N/A N/A self openbd read N/A N/A N/A N/A self logger info N/A N/A Finished copying {0} to RAM format N/A self bd N/A send_reply N/A N/A self conn addr code data N/A N/A N/A Send a reply with magic, only used for error codes. N/A reply N/A N/A struct pack !Q 1100100111001001 N/A reply N/A N/A struct pack !I code N/A reply N/A N/A struct pack !I N/A len data N/A reply data N/A N/A N/A conn send reply N/A handshake N/A N/A self conn addr N/A N/A N/A Initiate the connection, server sends first. N/A N/A N/A conn send NBDMAGIC N/A N/A N/A conn send IHAVEOPT N/A N/A N/A conn send N/A N/A struct pack !H 3 N/A N/A cflags N/A N/A struct unpack !I N/A N/A conn recv 4 N/A op 0 N/A N/A op 1 N/A N/A N/A magic N/A N/A struct unpack !Q N/A N/A conn recv 8 N/A N/A op N/A N/A struct unpack !I N/A N/A conn recv 4 N/A N/A op 1 N/A N/A N/A N/A self send_reply conn addr N/A N/A 2 31 1 N/A N/A namelen N/A N/A struct unpack !I N/A N/A conn recv 4 N/A name N/A N/A conn recv namelen N/A N/A name N/A self bd N/A N/A N/A N/A N/A self logger debug N/A N/A Blockdevice names do not match {0} != {1} format N/A self bd name N/A N/A N/A conn close N/A 1 N/A N/A N/A N/A self logger info N/A N/A Received request for {0} from {1} format name addr N/A exportinfo N/A N/A struct pack !Q N/A self bdsize N/A flags N/A N/A self write 0 2 N/A exportinfo N/A N/A struct pack !H flags N/A exportinfo N/A N/A chr 0 N/A N/A cflags 2 0 124 N/A N/A N/A conn send exportinfo N/A handle_client N/A N/A self conn addr seeklock N/A N/A N/A Handle all client actions, R/W/Disconnect N/A ret N/A N/A self handshake conn addr N/A ret N/A N/A N/A FS N/A N/A N/A writes write N/A self cow N/A self in_mem addr N/A self openbd N/A self logger seeklock N/A True N/A N/A N/A N/A conn recv 4 N/A N/A N/A N/A opcode handle offset length N/A N/A struct unpack !IQQI N/A N/A conn recv 24 N/A socket MSG_WAITALL N/A N/A N/A N/A struct error N/A N/A N/A N/A opcode N/A 0 1 2 N/A N/A N/A N/A self send_reply conn addr N/A N/A 2 31 1 N/A N/A N/A opcode 0 N/A N/A data N/A N/A FS read offset length N/A response N/A N/A struct pack !I 1732535960 N/A response N/A N/A struct pack !I 0 N/A response N/A N/A struct pack !Q handle N/A N/A N/A conn send response N/A N/A N/A conn send data N/A N/A N/A opcode 1 N/A N/A data N/A N/A conn recv length N/A socket MSG_WAITALL N/A N/A N/A FS write offset data N/A response N/A N/A struct pack !I 1732535960 N/A response N/A N/A struct pack !I 0 N/A response N/A N/A struct pack !Q handle N/A N/A N/A conn send response N/A N/A N/A opcode 2 N/A N/A N/A N/A conn close N/A N/A N/A N/A self logger info N/A N/A {0} disconnected format addr N/A N/A listen N/A N/A self N/A N/A N/A This method is the main loop that listens for requests. N/A seeklock N/A N/A threading Lock N/A cowfiles N/A N/A True N/A N/A N/A N/A N/A conn addr N/A N/A N/A self sock accept N/A dispatch N/A N/A threading Thread target N/A self handle_client args N/A conn addr seeklock N/A N/A dispatch daemon True N/A N/A N/A dispatch start N/A N/A N/A self cow N/A N/A self in_mem N/A N/A N/A N/A cowfiles append N/A N/A PyPXE_NBD_COW_{addr[0]}_{addr[1]} format addr addr N/A N/A N/A KeyboardInterrupt N/A N/A N/A map N/A os remove cowfiles N/A N/A N/A