Exploit database

GH-1a20f837c010c44c4376b2cd46cc5150

fastify/send

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2017-20165

1 source

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

Repository files10
fastify/sendRevision 789c51df089e

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

lib/createHtmlDocument.js

JavaScript · 633 bytes
/*!
 * send
 * Copyright(c) 2012 TJ Holowaychuk
 * Copyright(c) 2014-2022 Douglas Christopher Wilson
 * MIT Licensed
 */
'use strict'
/**
 * Create a minimal HTML document.
 *
 * @param {string} title
 * @param {string} body
 * @private
 */
function createHtmlDocument (title, body) {
  const html = '<!DOCTYPE html>\n' +
    '<html lang="en">\n' +
    '<head>\n' +
    '<meta charset="utf-8">\n' +
    '<title>' + title + '</title>\n' +
    '</head>\n' +
    '<body>\n' +
    '<pre>' + body + '</pre>\n' +
    '</body>\n' +
    '</html>\n'

  return [html, Buffer.byteLength(html)]
}
exports.createHtmlDocument = createHtmlDocument