Module: Pwnlib::Shellcraft::Generators::Amd64::Linux

Extended by:
Helper
Defined in:
lib/pwnlib/shellcraft/generators/amd64/linux/linux.rb,
lib/pwnlib/shellcraft/generators/amd64/linux/ls.rb,
lib/pwnlib/shellcraft/generators/amd64/linux/sh.rb,
lib/pwnlib/shellcraft/generators/amd64/linux/cat.rb,
lib/pwnlib/shellcraft/generators/amd64/linux/exit.rb,
lib/pwnlib/shellcraft/generators/amd64/linux/open.rb,
lib/pwnlib/shellcraft/generators/amd64/linux/sleep.rb,
lib/pwnlib/shellcraft/generators/amd64/linux/execve.rb,
lib/pwnlib/shellcraft/generators/amd64/linux/syscall.rb

Overview

For os-related methods.

Instance Method Summary collapse

Methods included from Helper

extended

Instance Method Details

#cat(filename, fd: 1) ⇒ Object

See Also:



15
16
17
18
19
# File 'lib/pwnlib/shellcraft/generators/amd64/linux/cat.rb', line 15

def cat(*args, **kwargs)
  context.local(arch: :amd64) do
    cat X86::Linux.cat(*args, **kwargs)
  end
end

#execve(path, argv, envp) ⇒ Object

See Also:



15
16
17
18
19
# File 'lib/pwnlib/shellcraft/generators/amd64/linux/execve.rb', line 15

def execve(*args)
  context.local(arch: :amd64) do
    cat X86::Linux.execve(*args)
  end
end

#exit(status = 0) ⇒ Object

See Also:



15
16
17
18
19
# File 'lib/pwnlib/shellcraft/generators/amd64/linux/exit.rb', line 15

def exit(*args)
  context.local(arch: :amd64) do
    cat X86::Linux.exit(*args)
  end
end

#ls(dir = '.') ⇒ Object

See Also:



15
16
17
18
19
# File 'lib/pwnlib/shellcraft/generators/amd64/linux/ls.rb', line 15

def ls(*args)
  context.local(arch: :amd64) do
    cat X86::Linux.ls(*args)
  end
end

#open(filename, flags = 'O_RDONLY', mode = 0) ⇒ Object

See Also:



15
16
17
18
19
# File 'lib/pwnlib/shellcraft/generators/amd64/linux/open.rb', line 15

def open(*args)
  context.local(arch: :amd64) do
    cat X86::Linux.open(*args)
  end
end

#sh(argv: false) ⇒ Object

See Also:



15
16
17
18
19
# File 'lib/pwnlib/shellcraft/generators/amd64/linux/sh.rb', line 15

def sh(**kwargs)
  context.local(arch: :amd64) do
    cat X86::Linux.sh(**kwargs)
  end
end

#sleep(seconds) ⇒ Object

See Also:



15
16
17
18
19
# File 'lib/pwnlib/shellcraft/generators/amd64/linux/sleep.rb', line 15

def sleep(*args)
  context.local(arch: :amd64) do
    cat X86::Linux.sleep(*args)
  end
end

#syscall(*arguments) ⇒ Object

See Also:



15
16
17
18
19
# File 'lib/pwnlib/shellcraft/generators/amd64/linux/syscall.rb', line 15

def syscall(*args)
  context.local(arch: :amd64) do
    cat X86::Linux.syscall(*args)
  end
end