![]() |
|
[C] Pastebin API using C (win32api) - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C] Pastebin API using C (win32api) (/showthread.php?tid=6153373) |
Pastebin API using C (win32api) - SIM-3437924 - May 11, 2021 Hello friends, I've recently attempted to use the Pastebin API in a project i'm working on in C to utilise it as a C2 server. but I've had no such luck in making it work. Does anybody have any experience with this?? Or perhaps any pointers?? I've tried it with wininet but I guess winsock would be better (just for av evasion) but either one is fine. Thanks in advance! RE: Pastebin API using C (win32api) - Doomslayer - May 23, 2021 It’s pretty easy to implement a HTTP request using TCP sockets. Plenty of examples online. RE: Pastebin API using C (win32api) - SIM-3437924 - May 30, 2021 (May 23, 2021 12:01 AM)Doomslayer Wrote: It’s pretty easy to implement a HTTP request using TCP sockets. Plenty of examples online. Could you list any examples? I found examples of GET requests but not so much for POST requests. RE: Pastebin API using C (win32api) - Doomslayer - May 30, 2021 (May 30, 2021 02:15 PM)AndyScott Wrote: Could you list any examples? I found examples of GET requests but not so much for POST requests. First result on google. https://stackoverflow.com/questions/22077802/simple-c-example-of-doing-an-http-post-and-consuming-the-response RE: Pastebin API using C (win32api) - SIM-3437924 - Jun 5, 2021 (May 30, 2021 03:21 PM)Doomslayer Wrote: First result on google. Hi, thank you for the link, it was very informative. However my problems still remains, see the code below: Code char* HttpRequest() {This code is meant to create a paste on pastebin. When returned, the output is "Bad API request, use POST request, not GET". So I seem to be making a GET request rather than a POST request... any suggestions on how to fix this? RE: Pastebin API using C (win32api) - BlueMoon1001 - Jul 1, 2021 I HIGHLY suggest using CURL. It is a mature library for http requests, literally made for this kind of task. You won't even have to call 1 winsock API function when you use CURL. RE: Pastebin API using C (win32api) - sigmasmom - Jul 2, 2021 This'll do you well and works for me. https://pastebin.com/b9fjki1y |