Skip to content

Instantly share code, notes, and snippets.

View thinkycx's full-sized avatar
😀

thinkycx thinkycx

😀
View GitHub Profile
@thinkycx
thinkycx / fbootfix.md
Created March 13, 2018 09:08 — forked from smac89/fbootfix.md
Linux Fix Fastboot "no permissions, verify udev rules"

Determine your device id

  1. Unplug your device from the computer and type lsusb in the terminal. You should get an output similar to this:
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 005: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
@thinkycx
thinkycx / git2.sh
Last active April 24, 2018 13:20
a wrapper of git clone used in vmware shared folders
#!/bin/bash
# author: thinkycx
# date: 2018-04-24
:<<EOF
usage:
alias git2 ~/scripts/git2.sh
git2 clone git://github.com/author/project_name.git [author@project_name]
use it in vmware shared folders which is actually stored on windows
@thinkycx
thinkycx / thinkycx-zsh.sh
Last active May 13, 2024 04:02
install zsh with one script ( Ubuntu/CentOS/macOS)
#!/bin/bash
# author: thinkycx
# date: 2018-04-30
# update: 2020-07-07
# 20230520 fix zsh-autosuggestions clone bug
# usage:
# curl -fsSL https://gist.githubusercontent.com/thinkycx/2e21c3572a8d1fde21aad07a58fcf940/raw/ -o zsh.sh && sudo bash zsh.sh
#
# install zsh for one script
# support ubuntu & centos & macOS
@thinkycx
thinkycx / pynotice.py
Last active May 1, 2018 02:11
send you an email after finish the job
#!/usr/bin/env python
# coding=utf-8
# author: thinkycx
# date: 20180430
"""
purpose:
send your an email after finish the job
notice that qq smtp cannot send emails frequently, about 2 times per 10 minutes.
and it's enough!
usage:
@thinkycx
thinkycx / cowroot.c
Created May 22, 2018 13:51 — forked from rverton/cowroot.c
CVE-2016-5195 (DirtyCow) Local Root PoC
/*
* (un)comment correct payload first (x86 or x64)!
*
* $ gcc cowroot.c -o cowroot -pthread
* $ ./cowroot
* DirtyCow root privilege escalation
* Backing up /usr/bin/passwd.. to /tmp/bak
* Size of binary: 57048
* Racing, this may take a while..
* /usr/bin/passwd overwritten
@thinkycx
thinkycx / dirty_passwd_adjust_cow.c
Created May 23, 2018 05:32 — forked from ngaro/dirty_passwd_adjust_cow.c
A dirty cow exploit that automatically finds the current user in passwd and changes it's uid to 0
#include <stdio.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <pthread.h>
#include <unistd.h>
#include <sys/stat.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
@thinkycx
thinkycx / find_files.c
Last active June 19, 2018 03:17
use BFS to traversal folder
#include <stdio.h>
#include <dirent.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <fcntl.h>
#include <arpa/inet.h>
#include <sys/types.h>
@thinkycx
thinkycx / scanfolder.c
Created June 19, 2018 04:34
Only support to scan folder and regular file.Maybe support symbolic etc in future...
/*
date: 20180619
author: thinkycx
usage: gcc scanfolder.c -o scanfolder
./scanfolder [foldername]
./scscanfolderan /home
Only support to scan folder and regular file.Maybe support symbolic etc in future...
*/
#include <stdio.h>
#include <dirent.h>
@thinkycx
thinkycx / start_pwn_with_1script.sh
Last active January 16, 2019 06:41
install softwares for pwn
#!/bin/bash
# maybe need to change pip file
# sudo vim /usr/bin/pip
# ln -s /mnt/hgfs/Pwn ~/pwn
# ln -s ~/pwn ~/Desktop/pwn
other(){
# vim plus
@thinkycx
thinkycx / malloc.c
Last active June 23, 2018 07:11
a copy of glibc2.23 malloc.c
/* Malloc implementation for multiple threads without lock contention.
Copyright (C) 1996-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@malloc.de>
and Doug Lea <dl@cs.oswego.edu>, 2001.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.