Skip to content

Instantly share code, notes, and snippets.

View lovmoon3k's full-sized avatar
💭
I may be slow to respond.

LovMoon3k lovmoon3k

💭
I may be slow to respond.
View GitHub Profile
@lovmoon3k
lovmoon3k / auto-remove-sublime-license-popup
Created June 7, 2022 13:09 — forked from egel/auto-remove-sublime-license-popup
Auto-remove Sublime's license popup
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sublime_plugin
import subprocess
from time import sleep
import sys
cl = lambda line: subprocess.Popen(line, shell=True, stdout=subprocess.PIPE).communicate()[0].strip()
log = lambda message: sys.stderr.write("Log: %s\n" % message)
@lovmoon3k
lovmoon3k / Phpobf.php
Created April 19, 2022 14:37 — forked from Datez-Kun/Phpobf.php
Php obfuscator ,written by kakatoji
<?php
class PhpObf {
private array $names = array();
private string $nono = "\x1b[H\x1b[2J\x1b[3J";
private string $enctype = '';
@lovmoon3k
lovmoon3k / dump-pyc-with-gdb.md
Created April 19, 2022 10:33 — forked from stecman/dump-pyc-with-gdb.md
Dumping all bytecode from a packaged Python application

This is a technique for extracting all imported modules from a packaged Python application as .pyc files, then decompiling them. The target program needs to be run from scratch, but no debugging symbols are necessary (assuming an unmodified build of Python is being used).

This was originally performed on 64-bit Linux with a Python 3.6 target. The Python scripts have since been updated to handle pyc files for Python 2.7 - 3.9.

Theory

In Python we can leverage the fact that any module import involving a .py* file will eventually arrive as ready-to-execute Python code object at this function:

PyObject* PyEval_EvalCode(PyObject *co, PyObject *globals, PyObject *locals);
@lovmoon3k
lovmoon3k / download.js
Created April 2, 2022 12:15 — forked from thinhbuzz/download.js
Download all photos from facebook Page
(async () => {
function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
function getPageId() {
const tags = Array.from(
document.body.querySelectorAll("script:not([src])")
);
@lovmoon3k
lovmoon3k / automatic_invoice.gs
Created March 25, 2022 14:24 — forked from automagictv/automatic_invoice.gs
Apps Script code to automatically replace template variables in your invoice document.
///////////////////////////////////////////////////////////////////////////////////////////////
// BEGIN EDITS ////////////////////////////////////////////////////////////////////////////////
const TEMPLATE_FILE_ID = 'YOUR_TEMPLATE_FILE_ID_HERE';
const DESTINATION_FOLDER_ID = 'YOUR_DESTINATION_FOLDER_ID_HERE';
const CURRENCY_SIGN = '$';
// END EDITS //////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////
// WARNING: EDITING ANYTHING BELOW THIS LINE WILL CHANGE THE BEHAVIOR OF THE SCRIPT. //////////
@lovmoon3k
lovmoon3k / download_gdrive
Created March 1, 2022 09:57 — forked from ankitmundada/download_gdrive
Shell Script to download Publicly shared Google drive files
#!/bin/bash
# Get files from Google Drive
# Source: https://stackoverflow.com/a/50573452/2382312
# Usage: download_gdrive FILE_ID DESTINATION_PATH
# $1 = file ID
# $2 = file name
URL="https://drive.google.com/uc?export=download&id=$1"
@lovmoon3k
lovmoon3k / app.py
Created February 14, 2022 09:03 — forked from tatiblockchain/app.py
Facebook Messenger API Python Code
from flask import Flask, request
import requests
import json
import config
app = Flask(__name__)
app.config['SECRET_KEY'] = 'enter-your-app-secret-key'
@lovmoon3k
lovmoon3k / gist:7301d0a82f6cc03c34d3013aa1299615
Created September 18, 2021 10:09 — forked from juliend2/gist:757422
Photoshop Javascript to increment text layer value and save for Web (in a loop)
function sfwPNG24(saveFile){
var pngOpts = new ExportOptionsSaveForWeb;
pngOpts.format = SaveDocumentType.PNG
pngOpts.PNG8 = false;
pngOpts.transparency = true;
pngOpts.interlaced = false;
pngOpts.quality = 100;
activeDocument.exportDocument(new File(saveFile),ExportType.SAVEFORWEB,pngOpts);
}