Skip to content

Instantly share code, notes, and snippets.

@lexesv
lexesv / webview-snapshot.c
Created April 5, 2021 14:04 — forked from rootAvish/webview-snapshot.c
This program will create an offscreen(invisible) webkit-web-view, and take a screenshot of the loaded document, the document/URL is passed as a command line argument to the program
#include <gtk/gtk.h>
#include <webkit/webkit.h>
static void destroyWindowCb(GtkWidget* widget, GtkWidget* window);
static gboolean closeWebViewCb(WebKitWebView* webView, GtkWidget* window);
static void
webkit_render_cb(WebKitWebView *webview,
@lexesv
lexesv / challenge.sh
Created October 17, 2017 15:41 — forked from bithavoc/challenge.sh
Letsencrypt manual DNS challenge via TXT records
sudo certbot certonly -d vault.reeactr.com --manual --preferred-challenges dns-01
@lexesv
lexesv / p2pclient.go
Created September 13, 2017 18:01 — forked from guileen/p2pclient.go
Go P2P Demo
// golang p2p udp client
package main
import (
"fmt"
"net"
"log"
"encoding/binary"
"encoding/hex"
@lexesv
lexesv / ld-preload-intercept-method.cpp
Created September 7, 2017 19:20 — forked from mooware/ld-preload-intercept-method.cpp
Intercept C++ methods with LD_PRELOAD
// this file is an example of how to intercept a C++ method by using the
// LD_PRELOAD environment variable of the GNU dynamic linker.
//
// it works like this:
//
// 1) define a method that will have the same symbol as the intercepted
// method when compiled. For example, the method Foo::getValue()
// defined here has the mangled symbol "_ZNK3Foo8getValueEv".
// tools like nm, objdump or readelf can display the symbols of
// binaries.