Sha256: 95ddc57b61c5f081c6e7470e5349c24f3e5ae6636f5d2b1b1a09175a069abf59
Contents?: true
Size: 971 Bytes
Versions: 102
Compression:
Stored size: 971 Bytes
Contents
# frozen_string_literal: true require 'ffi' PubFFI = FFI module PWN module FFI # This plugin is a wrapper for the standard I/O functions in libc. module Stdio extend PubFFI::Library ffi_lib PubFFI::Library::LIBC attach_function(:puts, [:string], :int) attach_function(:printf, %i[string varargs], :int, convention: :default) attach_function(:scanf, %i[string varargs], :int) # Author(s):: 0day Inc. <support@0dayinc.com> public_class_method def self.authors "AUTHOR(S): 0day Inc. <support@0dayinc.com> " end # Display Usage for this Module public_class_method def self.help puts "USAGE: #{self}.puts string #{self}.printf(\"format string\", str, int, etc) scanf_buffer = FFI::MemoryPointer.new(:char, 100) #{self}.scanf(\"format string\", scanf_buffer) #{self}.authors " end end end end
Version data entries
102 entries across 102 versions & 1 rubygems