Git Product home page Git Product logo

yeswehack-sdk's Introduction

YesWeHack SDK ๐Ÿงฐ

YesWeHack SDK written in Deno ๐Ÿฆ•

This SDK has been written for personal needs, if you want to improve it you can submit PRs.

Usage ๐Ÿ‘จ๐Ÿผโ€๐Ÿ”ฌ

Login ๐Ÿšช

import { YWH } from "https://deno.land/x/yeswehack/mod.ts";

const ywh = new YWH();

await ywh
        .login('{LOGIN}', '{PASSWORD}')
        .catch((error) => {
            console.log(error);
        });

Login (TOTP) ๐Ÿšช + ๐Ÿ”‘

import { YWH } from "https://deno.land/x/yeswehack/mod.ts";

const ywh = new YWH();

await ywh
        .login('{LOGIN}', '{PASSWORD}')
        .then(async () => await ywh.totp('{TOTP_CODE}'))
        .catch((error) => {
            console.log(error);
        });

Hacktivity โšก๏ธ

import { YWH } from "https://deno.land/x/yeswehack/mod.ts";

const ywh = new YWH();

await ywh
        .login('{LOGIN}', '{PASSWORD}')
        .catch((error) => {
            console.log(error);
        });
        
const hacks = await ywh.hacktivityPerPage(1); // retrieve first page of hacktivity

hacks.map((hack: any) => {
  console.log(hack.report.hunter.username);
});

Reports ๐Ÿ“„

import { YWH } from "https://deno.land/x/yeswehack/mod.ts";

const ywh = new YWH();

await ywh
        .login('{LOGIN}', '{PASSWORD}')
        .catch((error) => {
            console.log(error);
        });
        
const reports = await ywh.reports();

reports.map((report: any) => {
  console.log(report.title);
});

Programs ๐Ÿ—‚

import { YWH } from "https://deno.land/x/yeswehack/mod.ts";

const ywh = new YWH();

await ywh
        .login('{LOGIN}', '{PASSWORD}')
        .catch((error) => {
            console.log(error);
        });
        
const programs = await ywh.programs();

programs.map((program: any) => {
  console.log(program.title);
});

User (current) ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ผ

import { YWH } from "https://deno.land/x/yeswehack/mod.ts";

const ywh = new YWH();

await ywh
        .login('{LOGIN}', '{PASSWORD}')
        .catch((error) => {
            console.log(error);
        });
        
const user = await ywh.user();

console.log(`Log as ${user.username}`);

User (with username) ๐Ÿ‘จ

import { YWH } from "https://deno.land/x/yeswehack/mod.ts";

const ywh = new YWH();

await ywh
        .login('{LOGIN}', '{PASSWORD}')
        .catch((error) => {
            console.log(error);
        });
        
const hunter = await ywh.user('BZHugs');

console.log(hunter);

Todos ๐Ÿ“Œ

  • Use interfaces for response objects (reports, hacks, hunter etc.) instead of using any.
  • Add some methods (submit reports, update current user etc.)

yeswehack-sdk's People

Contributors

tchenu avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.