Tag: cpp

C/C++, Hacking, Post-Exploitation, RedTeaming

HTTP – Get the external IP address in C

The following code snippets is from Post-recon project. This project is a work in progress. Please visit GitHub for the full source code, in this post I will just point out the most interesting parts. Get Public IP address (HTTP)   {…}   #define PUBLIC_IP_URL "http://ipecho.net/plain"   {…}   int LibCurl::GetPublicIPv4Address(char **ip, const char *userAgent, …

C/C++, Hacking, Post-Exploitation, Programming

Generating a unique machine id

The following code snippets is from Post-recon project. This project is a work in progress. You can check Github for the full source code, here I will just point out the most interesting parts. Current source code Generate computer unique ID Architecture Windows OS version Cpu Gpu is admin? MotherBoard Chassis Type Username PC name …

C/C++, IDE, Programming

Qt – Cross-platform software development

Download Visit http://info.qt.io/download-qt-for-application-development Select “Get your open source package“ Click “View All Downloads“ To build x86 binaries, download Qt 5.8.0 for Windows 32-bit (VS 2015, 1.0 GB) To build x64 binaries, download Qt 5.8.0 for Windows 64-bit (VS 2015, 1.0 GB) Beautifying Source Code Download Artistic Style Extract astyle to e.g. Documents Open qt creator …

C/C++, libCurl

Send email with attachment using Gmail, C and libcurl – Part 3

Requirements * A Gmail account (Use a dedicated account! Do not use your personal one!) * Turn on “Access for less secure apps” under the security settings of the account. less secure apps * You may also have to enable IMAP in the account settings. The following code snippets is from Post-recon project. This project …

C/C++, libCurl

Send email using Gmail, C and libcurl – Part 1

libcurl is a free and easy-to-use client-side URL transfer library, supporting DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP. libcurl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, …

C, C++, Python

Integrate python with C/C++ components

ctypes is a foreign function library for Python. It provides C compatible data types, and allows calling functions in DLLs or shared libraries. It can be used to wrap these libraries in pure Python. ctypes exports the cdll, and on Windows windll and oledll objects, for loading dynamic link libraries. You load libraries by accessing …