Exploit database

GH-f1172bb323ceb73f88bb7e58e8982f98

ctkqiang/php2shellpoc2026

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-109618

412 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files38
ctkqiang/php2shellpoc2026Revision e4be28598cb8

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

lib/php2shell_poc2026/report.rb

Ruby · 1,762 bytes
# frozen_string_literal: true

require "time"

require_relative "summary"
require_relative "report/text"
require_relative "report/json"
require_relative "report/markdown"
require_relative "report/sarif"
require_relative "report/csv"
require_relative "report/ndjson"

module PHP2ShellPOC2026
  # Rendering lives here rather than in the CLI so presentation can change —
  # or gain a seventh format — without touching scan logic. Every renderer
  # receives the same results and the same computed summary, which is how
  # text, JSON and SARIF stay numerically consistent.
  module Report
    FORMATS = %w[text json markdown sarif csv ndjson].freeze

    def self.render(results, options, meta: {})
      meta = meta.merge(
        generated_at: meta[:generated_at] || Time.now.utc.iso8601,
        profile: meta[:profile] || options.profile,
        format: options.format
      )
      summary = Summary.compute(results, meta: meta)

      case options.format
      when "text"
        Text.new(results, options, summary: summary, meta: meta).render
      when "json"
        Json.render(results, options, summary: summary, meta: meta)
      when "markdown"
        Markdown.render(results, options, summary: summary, meta: meta)
      when "sarif"
        Sarif.render(results, options, summary: summary, meta: meta)
      when "csv"
        Csv.render(results, options, summary: summary, meta: meta)
      when "ndjson"
        Ndjson.render(results, options, summary: summary, meta: meta)
      else
        raise UsageError, "unknown format: #{options.format.inspect}"
      end
    end

    def self.summary(results, options, meta: {})
      Summary.compute(results, meta: meta.merge(profile: options.profile, format: options.format))
    end
  end
end