Project

koji

0.0
No release in over 3 years
Low commit activity in last 3 years
A development/staging environment detector.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.0
~> 0.8
~> 12.3
~> 3.8
~> 3.5

Runtime

~> 4.1
~> 0.1
~> 2.15
~> 0.19
 Project Readme

koji

Gem Version Build Status Coverage Status CodeFactor

koji (工事) is a development/staging environment detector.

Features

  • Web app debug feature detection (CodeIgniter, Django, FuelPHP and etc.)
  • Suspicious domain detection (e.g. dev.*.com, stg.*.com)
  • Self-signed certificate detection

Installation

gem install koji

Usage

As a CLI

$ koji help
Commands:
  koji check URL       # check a given URL
  koji help [COMMAND]  # Describe available commands or one specific command

$ koji check https://github.com/ninoseki/koji
{
  "verdict": "Not underconstruction",
  "score": 0
}

$ koji check https://dev.example.com
{
  "verdict": "Possibly underconstruction",
  "score": 50
}

$ koji check http://phpdebugbar.com/
{
  "verdict": "Underconstruction",
  "score": 100
}

$ koji check http://phpdebugbar.com/ --verbose
{
  "verdict": "Underconstruction",
  "score": 100,
  "plugin_reports": [
    {
      "name": "PHPDebugBar",
      "evidence_list": [
        "The website contains PHP DebugBar"
      ],
      "score": 100
    }
  ]
}

$ koji check https://self-signed.badssl.com/ --verbose
{
  "verdict": "Underconstruction",
  "score": 100,
  "plugin_reports": [
    {
      "name": "SelfSignedCertificate",
      "evidence_list": [
        "The website has a self-signed certificate"
      ],
      "score": 100
    }
  ]
}

As a library

require "koji"

website = Koji::Website.new("http://example.com")
detector = Koji::Detector.new(website)

puts detector.report
puts detector.detailed_report