Skip to content

Instantly share code, notes, and snippets.

View ducktype's full-sized avatar
👺
Never Satisfied!

ducktype

👺
Never Satisfied!
View GitHub Profile
@boro32
boro32 / index.js
Created November 4, 2017 19:01
Get list of all users in Telegram channel / supergroup
/*
* MIT License
*
* Copyright (c) 2017 Bannerets <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@xeoncross
xeoncross / http.php
Created October 24, 2017 01:49
POST requests using curl, sockets, and php-curl
<?php
// command line
// curl --data "text=foobar" http://localhost:3001/api/decrypt
// File sockets
function http_request($url, $data, $a = null, $b = null) {
$opts = array('http' =>
array(
'method' => 'POST',
//npm init -y
//npm install --save puppeteer
//usage: node script.js /path/to/input.html /path/to/output.pdf
//script.js
const puppeteer = require('puppeteer');
(async () => {
@hakre
hakre / other.php
Created June 18, 2017 23:50
inject php declare ticks poc
<?php
/**
* just some file
*/
$a = 1;
if ($a > 0) {
$a += 2;
print($a);
@tehrengruber
tehrengruber / void_cb.cpp
Created March 22, 2017 20:09
Optional callback in C++
/**
* Functor behaving like an unset function pointer (nullptr) with
* arbitrary number of arguments.
*
* Usage:
* ```
* #include "Utils/void_cb.hpp"
*
* template <typename CB=void_cb>
* void f(CB callback=nullptr) {
@artyom
artyom / ssh-mux.go
Created February 25, 2017 17:26
Example ssh server with both interactive terminal & sftp support
package main
import (
"bufio"
"bytes"
"flag"
"fmt"
"io"
"io/ioutil"
"log"
@alpegon
alpegon / disable_service.sh
Created February 15, 2017 16:18
Disable auto update and upgrade Ubuntu 16.04
# From https://www.hiroom2.com/2016/05/18/ubuntu-16-04-auto-apt-update-and-apt-upgrade/
# Fix dpkg error in ubuntu 16
sudo systemctl disable apt-daily.service # disable run when system boot
sudo systemctl disable apt-daily.timer # disable timer run
@hasherezade
hasherezade / syscall_extractor.cpp
Last active August 30, 2023 21:47
Extracts syscalls list from NTDLL.DLL
#include <stdio.h>
#include <Windows.h>
// based on: https://www.evilsocket.net/2014/02/11/on-windows-syscall-mechanism-and-syscall-numbers-extraction-methods/
// author: @evilsocket
// modified by: @hasherezade
#define IS_ADDRESS_BETWEEN( left, right, address ) ( (address) >= (left) && (address) < (right) )
PIMAGE_SECTION_HEADER SectionByRVA( PIMAGE_SECTION_HEADER pSections, DWORD dwSections, DWORD rva )
{
REG ADD "HKCU\Control Panel\Desktop" /v DpiScalingVer /t REG_DWORD /d 0x00001018 /f
REG ADD "HKCU\Control Panel\Desktop" /v Win8DpiScaling /t REG_DWORD /d 0x00000001 /f
REG ADD "HKCU\Control Panel\Desktop" /v Logpixels /t REG_DWORD /d 0x00000078 /f
@CMCDragonkai
CMCDragonkai / regular_expression_engine_comparison.md
Last active July 8, 2025 17:51
Regular Expression Engine Comparison Chart

Regular Expression Engine Comparison Chart

Many different applications claim to support regular expressions. But what does that even mean?

Well there are lots of different regular expression engines, and they all have different feature sets and different time-space efficiencies.

The information here is just copied from: http://regular-expressions.mobi/refflavors.html