Categories > Coding > PHP >

[RELEASE] API For Creating Hastebin and Linkvertise Links

Murz

PixelPenguin

Posts: 252

Threads: 20

Joined: Jul, 2021

Reputation: 29

Posted

Hello, I was bored and needed a project idea, I created a API for creating Hastebin and Linkvertise links in PHP.

 

This was inspired from a post made by AlternateD.

 

Documentation: https://eurythmical-salvage.000webhostapp.com/documentation

 

Hopefully the documentation isn't confusing, I am not the best explainer, if you need another explanation just let me know and I'll try to help!

 

For the linkvertise part, I did get the main concept from this guy on github, here is the repo. It was made in javascript, I converted it over to PHP.

 

Though I do not recommend using the API for linkvertise if you are looking for security as bypassing it is really easy since it uses Base64 encryption.

 

The following is the source code of the project;

https://eurythmical-salvage.000webhostapp.com/source

https://cdn.discordapp.com/attachments/1066565161135116318/1067246964338593832/carbon.png

  • 0

 

Ty for rep: Swiney, Byoke, Lion, Locust, Waves, Weeb, Nickk, darkn, Atari, CubeFaces, Lux14, Rice, Delta, Syraxes, Aeon, Jordan, Pluto, and Hiroku!

P.S, I like cats better too!

VoidableMethod

monday left me broken

vip

Posts: 1980

Threads: 186

Joined: Apr, 2021

Reputation: 17

Replied

As you said, very insecure, but I'm glad seeing someone using PHP.

  • 0

Alternate

stop take my rice

patron

Posts: 672

Threads: 103

Joined: Mar, 2022

Reputation: 38

Replied

I'm glad I could be inspiration! Good job on this!

  • 0

test_bot2 is back

 

please stop taking my rice i need it to breathe

Murz

PixelPenguin

Posts: 252

Threads: 20

Joined: Jul, 2021

Reputation: 29

Replied

@VoidableMethod yea, sadly the linkvertise api isn't the best for this type of a situation. However, the hastebin works amazingly! I'm glad you found this project interesting :)

  • 0

Added

@Alternate Thank you very much, your project was very neat and I wanted to create a API for it hoping you didn't mind :)

  • 0

 

Ty for rep: Swiney, Byoke, Lion, Locust, Waves, Weeb, Nickk, darkn, Atari, CubeFaces, Lux14, Rice, Delta, Syraxes, Aeon, Jordan, Pluto, and Hiroku!

P.S, I like cats better too!

bennytrt

Atonix V3 Soon?

Posts: 632

Threads: 56

Joined: Apr, 2022

Reputation: 32

Replied

Vouch!! I will now skid this code and change nothing about it

  • 0

Atonix Discord

https://discord.gg/hpQVuAyccJ

Murz

PixelPenguin

Posts: 252

Threads: 20

Joined: Jul, 2021

Reputation: 29

Replied

@bennytrt,

 

no need to change it, use it if you want to! I released it for all to use, :)

  • 0

 

Ty for rep: Swiney, Byoke, Lion, Locust, Waves, Weeb, Nickk, darkn, Atari, CubeFaces, Lux14, Rice, Delta, Syraxes, Aeon, Jordan, Pluto, and Hiroku!

P.S, I like cats better too!

Posts: 37

Threads: 8

Joined: Jul, 2022

Reputation: 11

Replied

you can break some linkvertise bypassers by doing this:

 

<?php

$type = $_GET["type"];
$id = $_GET["id"];
$content = $_GET["content"];

function createHastebin($data)
{
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "https://hastebin.com/documents");
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, array('data' => $data));
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $resp = curl_exec($ch);
    
    echo "https://hastebin.com/raw/".json_decode($resp, true)["key"];
}

function createLinkvertise($link, $uid)
{
    $math = rand() * 1000;
    $linkvertiseLink = "https://link-to.net/".$uid."/".$math."/dynamic?redirect=".base64_encode("OAWIDJwoiJDwaoiJDWOijdwaoiD")."&r=".base64_encode($link)."&redir=".base64_encode("https://notas.it/e");
    
    echo $linkvertiseLink;
}

if ($type == "hastebin" && $content != "") { createHastebin($content); }
else if ($type == "linkvertise" && $content != "" && $id != "") { createLinkvertise($content, $id); }
else { echo "One of the parameters is invalid."; }

?>

 

this should work because some of them don't parse args correctly.

  • 0

veh_handler and seh_handler disliker

<p>enis</p>

Murz

PixelPenguin

Posts: 252

Threads: 20

Joined: Jul, 2021

Reputation: 29

Replied

@Verbum, interesting. Nice protection methods, :)

  • 0

 

Ty for rep: Swiney, Byoke, Lion, Locust, Waves, Weeb, Nickk, darkn, Atari, CubeFaces, Lux14, Rice, Delta, Syraxes, Aeon, Jordan, Pluto, and Hiroku!

P.S, I like cats better too!

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )