MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / _parse_access

Method _parse_access

pydevd_attach_to_process/winappdbg/sql.py:531–557  ·  view source on GitHub ↗
(access)

Source from the content-addressed store, hash-verified

529
530 @staticmethod
531 def _parse_access(access):
532 if not access:
533 return 0
534 perm = access[:3]
535 if perm == "R--":
536 protect = win32.PAGE_READONLY
537 elif perm == "RW-":
538 protect = win32.PAGE_READWRITE
539 elif perm == "RC-":
540 protect = win32.PAGE_WRITECOPY
541 elif perm == "--X":
542 protect = win32.PAGE_EXECUTE
543 elif perm == "R-X":
544 protect = win32.PAGE_EXECUTE_READ
545 elif perm == "RWX":
546 protect = win32.PAGE_EXECUTE_READWRITE
547 elif perm == "RCX":
548 protect = win32.PAGE_EXECUTE_WRITECOPY
549 else:
550 protect = win32.PAGE_NOACCESS
551 if access[5] == "G":
552 protect = protect | win32.PAGE_GUARD
553 if access[6] == "N":
554 protect = protect | win32.PAGE_NOCACHE
555 if access[7] == "W":
556 protect = protect | win32.PAGE_WRITECOMBINE
557 return protect
558
559
560# ------------------------------------------------------------------------------

Callers 1

toMBIMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected