Skip to content

Instantly share code, notes, and snippets.

View result.txt
sum(a): 10656
sum(b): 10656
a = 1776 , len(b) = 83, sum(b) = 10656
588
504
280
224
180
a = 2667 , len(b) = 78, sum(b) = 8880
364
@4ft35t
4ft35t / AndroidManifest.xml
Last active April 14, 2022 02:49 — forked from burinov/1commands.sh
Example on how to use adb to start an Activity,BroadcastReceiver or Service from adb and include intent extras too.for Activity: adb shell am start -n "com.peirr.test/com.peirr.test.MyActivity" --es name "John" --ei age 30for BroadcastReceiver adb shell am broadcast -n "com.peirr.test/com.peirr.test.MyReceiver" --es name "John" --ei age 30for Se…
View AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.peirr.test">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">
@4ft35t
4ft35t / google-photo-free-up-space.js
Last active March 25, 2022 13:36
Upload Synology photos to FTP. eg: FTP server on Pixel one(2016) to get unlimited Google Photos backup.
View google-photo-free-up-space.js
auto();
console.show()
var utils = require('utils.js');
pkgName='com.google.android.apps.photos'
// 直接启动
app.startActivity({
packageName: pkgName,
@4ft35t
4ft35t / result.md
Last active December 30, 2019 09:24
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 June 20, 2019 06:27 — 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 April 3, 2019 07:26 — 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 February 19, 2019 03:37
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 December 4, 2022 15:55 — forked from benkulbertis/cloudflare-update-record.sh
Cloudflare API v4 Dynamic DNS Update in Bash
View cloudflare-update-record.sh
#!/bin/sh
## edit this
cf_ddns_host=myddns.mydomain.com
# My Profile - API Tokens - Create Token - Use template of Edit zone DNS - Zone Resources - Include - All zones - Continue to summary - Create Token
cf_token=
## edit end
# auto fetch
cf_zoneid=