webhtools
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

Webhtools

This is set of useful tool for webhacking. Includes request helper, dreamhack helper etc.

Installation

npm install webhtools

Usage

Dreamhack Problem Tools

import {ProblemHelper} from "webhtools";

async function run() {
  // const ph = await new ProblemHelper(<problemId>).init();
  const ph = await new ProblemHelper(927).init();

  await ph.openVM();
  // exploit
  console.log(ph.getURL());
  await ph.closeVM();
}

run();

At first time, you need to enter your dreamhack account info.

Request Helper

import {RequestHelper, ProblemHelper} from "webhtools";

const ph = await new ProblemHelper(927).init();
await ph.openVM();

const rh = new RequestHelper(ph.getURL());
const res = await rh.get("/");
console.log(res.ok);
console.log(res.status);
console.log(res.bytes);
console.log(res.text);
console.log(res.json);
console.log(res.formData);

// in fact, you don't need to close vm. it will close automatically
// await ph.closeVM();

Readme

Keywords

none

Package Sidebar

Install

npm i webhtools

Weekly Downloads

155

Version

0.3.1

License

ISC

Unpacked Size

75.3 kB

Total Files

64

Last publish

Collaborators

  • yeonfish6040