mirror of https://github.com/pwndbg/pwndbg.git
Add commands to print kernel commandline and version (#1434)
Co-authored-by: Gulshan Singh <gsgx@google.com>pull/1435/head
parent
a575fa7fab
commit
6f50b08767
@ -0,0 +1,12 @@
|
|||||||
|
import argparse
|
||||||
|
|
||||||
|
import pwndbg.commands
|
||||||
|
import pwndbg.gdblib.kernel
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(description="Return the kernel commandline (/proc/cmdline)")
|
||||||
|
|
||||||
|
|
||||||
|
@pwndbg.commands.ArgparsedCommand(parser)
|
||||||
|
@pwndbg.commands.OnlyWhenQemuKernel
|
||||||
|
def kcmdline():
|
||||||
|
print(pwndbg.gdblib.kernel.kcmdline())
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
import argparse
|
||||||
|
|
||||||
|
import pwndbg.commands
|
||||||
|
import pwndbg.gdblib.kernel
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(description="Outputs the kernel version (/proc/version)")
|
||||||
|
|
||||||
|
|
||||||
|
@pwndbg.commands.ArgparsedCommand(parser)
|
||||||
|
@pwndbg.commands.OnlyWhenQemuKernel
|
||||||
|
def kversion():
|
||||||
|
print(pwndbg.gdblib.kernel.kversion())
|
||||||
Loading…
Reference in new issue