Skip to content

Instantly share code, notes, and snippets.

View result.md
cat test.txt | sed  -n '/^start/,/^end/{/^start/,/i hate you/{/i hate you/p;};}'
i hate you 2
i hate you 4
i hate you 6
cat test.txt| awk '/start /{in_block=1; next} in_block && /i hate you/{t=$0; in_block=0; next} t && /end/{print t; t=""}'
i hate you 2
@4ft35t
4ft35t / android-captive.sh
Created Jun 20, 2019 — forked from tonyseek/android-captive.sh
Overrides the captive portal settings of Android in the People's Republic China Mainland
View android-captive.sh
#!/usr/bin/env sh
adb shell settings put global captive_portal_fallback_url http://g.cn/generate_204
adb shell settings put global captive_portal_http_url http://www.google.cn/generate_204
adb shell settings put global captive_portal_https_url https://www.google.cn/generate_204
adb shell settings put global captive_portal_other_fallback_urls http://www.qualcomm.cn/generate_204
@4ft35t
4ft35t / unwxapkg.py
Created Apr 3, 2019 — forked from Integ/unwxapkg.py
A useful tool for unpack wxapkg file with python3 surport.
View unwxapkg.py
# coding: utf-8
# py2 origin author lrdcq
# usage python3 unwxapkg.py filename
__author__ = 'Integ: https://github.com./integ'
import sys, os
import struct
class WxapkgFile(object):
View create-cert.sh
#!/bin/bash
set -euo pipefail
# http://apetec.com/support/GenerateSAN-CSR.htm
# http://chschneider.eu/linux/server/openssl.shtml
DOMAIN=${1:-c9.dev}
IP=${2:-127.0.0.1}
if [[ "$DOMAIN$IP" =~ [/[:space:]] ]]; then
@4ft35t
4ft35t / disable-right-key.html
Created Feb 19, 2019
disable the right key
View disable-right-key.html
<script for=document event="oncontextmenu()" language="javascript">
/*disable the right key*/
//return false;
</script>
View frida-get-AES-keys
#!/usr/bin/env python3
from __future__ import print_function
import frida
import sys
import json
import time
def on_message(message, payload):
if(message['type'] == 'send'):
@4ft35t
4ft35t / cloudflare-update-record.sh
Last active Aug 21, 2020 — forked from benkulbertis/cloudflare-update-record.sh
Cloudflare API v4 Dynamic DNS Update in Bash
View cloudflare-update-record.sh
#!/bin/sh
# CHANGE THESE
auth_email="user@example.com"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare "profile" - "api-tokens" - "Global API Key"
zone_name="example.com"
record_name="www.example.com" # must add on cloudflare websit before run this script. Or you will get error `Method PUT not available for that URI`
# MAYBE CHANGE THESE
ip=$(curl -s http://ipv4.icanhazip.com)
@4ft35t
4ft35t / SCITV_UDPXY.M3U
Created Jun 15, 2018 — forked from zxp/SCITV_UDPXY.M3U
[四川电信ITV 190个频道的组播表] 四川电信IPTV 190个频道的组播表,截取于2017年8月 #scitv #iptv #sichuan
View SCITV_UDPXY.M3U
#EXTM3U name="四川电信IPTV"
#EXTINF:-1,CCTV-1高清
http://192.168.2.2/rtp/239.93.0.184:5140
#EXTINF:-1,CCTV-2高清
http://192.168.2.2/rtp/239.93.1.23:6000
#EXTINF:-1,CCTV-3高清
http://192.168.2.2/rtp/239.93.1.11:2223
#EXTINF:-1,CCTV-5高清
http://192.168.2.2/rtp/239.93.1.12:2224
#EXTINF:-1,CCTV-6高清
View WeiyunExporter.js
(function() {
function escapeQuote(str) {
return str.replace("\"", "\\\"");
}
function buildAria2Url(name, url) {
return `aria2c -c -s10 -k1M -x16 --enable-rpc=false ` +
`-o "${escapeQuote(name)}" ` +
`--header "${escapeQuote(window.navigator.userAgent)}" ` +
`--header "Referer: ${escapeQuote(window.location.toString())}" ` +
@4ft35t
4ft35t / ingress-passcode.js
Created May 27, 2018 — forked from idealhack/ingress-passcode.js
ingress passcode auto run
View ingress-passcode.js
// disable iitc plugin if it's on
// go to https://www.ingress.com/intel
// open console and paste in the code below, press enter
// join https://t.me/passcodes for more passcodes
// add jquery
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
You can’t perform that action at this time.