Skip to content

Instantly share code, notes, and snippets.

View suzuke's full-sized avatar

suzuke suzuke

  • Taiwan
View GitHub Profile
import subprocess
import openai
import re
from collections import defaultdict
import textwrap
import time
import shlex
openai.api_key = open("./openai_key.txt", "r").read().strip("\n")
@suzuke
suzuke / modify.py
Created August 28, 2022 06:57
ELF Backdoor injector
from utils import parse_args
from parse import elf_info
from struct import pack
import logging
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.NOTSET)
class injector:
@suzuke
suzuke / FindNoxListeningPort.txt
Created August 15, 2022 03:16 — forked from edwardsmoses/FindNoxListeningPort.txt
Find Nox Listening Port in Windows CMD for adb devices connect.
for /f "tokens=2" %a in ('tasklist ^|findstr Nox.') do netstat -aon | findstr %a
---Link For Connecting Nox to Adb---
https://www.bignox.com/blog/how-to-connect-android-studio-with-nox-app-player-for-android-development-and-debug/
@suzuke
suzuke / killbutmakeitlooklikeanaccident.bat
Created August 10, 2022 06:17 — forked from mbikovitsky/killbutmakeitlooklikeanaccident.bat
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
@"C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe" -sins -y "srv*nul" -c "r rip = ntdll!NtTerminateProcess; r rcx = -1; r rdx = 0; r rsp = (@rsp & 0xFFFFFFFFFFFFFFF0) - 8; eq @rsp (-1); qd" -p %1
@suzuke
suzuke / md5.gs
Created January 5, 2021 07:32 — forked from KEINOS/md5.gs
GAS(Google Apps Script) user function to get MD5 hash or 4digit shortened hash for Multibyte(UTF-8, 2bytes character) environment.
/**
* ------------------------------------------
* MD5 function for GAS(GoogleAppsScript)
*
* You can get a MD5 hash value and even a 4digit short Hash value of a string.
* ------------------------------------------
* Usage1:
* `=MD5("YourStringToHash")`
* or
* `=MD5( A1 )` with the same string at A1 cell
@suzuke
suzuke / ChunkyCache.gs
Created December 22, 2020 00:13 — forked from pilbot/ChunkyCache.gs
Using the Google Apps Script Cache Service for objects above 100Kb
function ChunkyCache(cache, chunkSize){
return {
put: function (key, value, timeout) {
var json = JSON.stringify(value);
var cSize = Math.floor(chunkSize / 2);
var chunks = [];
var index = 0;
while (index < json.length){
cKey = key + "_" + index;
chunks.push(cKey);
@suzuke
suzuke / google-apps-script.md
Created December 16, 2020 09:35 — forked from labnol/google-apps-script.md
How to Learn Google Apps Script

Learning Google Apps Script

Find the best resources for learning Google Apps Script, the glue that connects all GSuite services including Gmail, Google Drive, Calendar, Google Sheets, Forms, Maps, Analytics and more.

A good place to learn more about Google Apps Script is the official documentation available at developers.google.com. Here are other Apps Script resources that will help you get up to speed.

  1. Google Apps Script Code Samples by Amit Agarwal
  2. Google Apps Script Development - Create Google Apps Script projects locally inside VS Code - video tutorial
  3. Awesome Google Scripts by Amit Agarwal
  4. Google Developer Experts - Follow Apps Scr
@suzuke
suzuke / UnmergedRanges.gs
Created December 16, 2020 09:33 — forked from erickoledadevrel/UnmergedRanges.gs
[Apps Script] Getting the unmerged ranges within a range
/**
* Gets all the unmerged ranges within a range.
* @param {SpreadsheetApp.Range} range The range to evaluate.
* @returns {SpreadsheetApp.Range[]} The unmerged ranges.
*/
function getUnmergedRanges(range) {
if (!range.isPartOfMerge()) {
return [range];
}
var mergedRanges = range.getMergedRanges();
@suzuke
suzuke / bitly
Created December 15, 2020 01:17 — forked from u0401006/bitly
google app script custom formula bitly()
function bitly(source,date,content,who,url) {
var d= (new Date(date.getTime()+3600000*24)).toISOString().slice(0,10).replace(/20/, "").replace("-","").replace("-","");
//宣告一個變數叫d,取輸入的日期來清整格式
var utm2= content.substring(0, 10)+'-';
//避免網址太長或者是遇到特殊字被截斷,活動名稱只取10個字
if (who.match("A|B")){
var utm3= 'marketing-'+utm2;
@suzuke
suzuke / LICENSE
Created July 14, 2020 00:37 — forked from dnozay/LICENSE
Datetime utilities extracted from Django code as a single module.
Copyright (c) Django Software Foundation and individual contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright