Skip to content

Instantly share code, notes, and snippets.

package com.android.server;
import android.content.Context;
import android.content.IntentFilter;
import android.os.Build.VERSION;
import android.os.IBinder;
import android.os.ServiceManager;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.util.Slog;
@jat001
jat001 / daemon.vbs
Last active December 8, 2021 20:47
shadowsocks local daemon on Windows.
Set ws = CreateObject("Wscript.Shell")
ws.run "C:\Users\Jat\AppData\Local\shadowsocks\run.cmd " & WScript.Arguments(0), vbhide
@jat001
jat001 / namebase.py
Created February 20, 2020 10:05
Sell HNS automatically
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
from decimal import Decimal
from datetime import datetime
try:
import requests
import simplejson as json
Set Processes = GetObject("winmgmts:").InstancesOf("Win32_Process")
intProcessId = ""
For Each Process In Processes
If StrComp(Process.Name, "Wow-64.exe", vbTextCompare) = 0 Then
intProcessId = Process.ProcessId
Exit For
End If
Next
@jat001
jat001 / pgp_pub.asc
Last active February 3, 2021 19:41
PGP Fingerprint: B2EE 8B75 21A3 A2CC 3B6D D45F 5800 C6E0 11A0 C293
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFTxWW0BEAC/M9EKruR/YyDt42a1ck2n7Me0WIqOoNEKzCehQDTklKCND8nJ
TBgn1scj3oo6zNQAx39VbC4RV63F/yvmsBxuYbY1CXdN5D1Xai+8jZkh09+/CvKf
vcFDFaQ9olh/vz1o36pdnLbkdGhiOEMcQsa19cu0JxhEhTuH3JU5JNNyfzoRM4MP
P+Kp9e8xL0DHKCviGJoW9claOq96VIbWIapHltjoksIwOVhHg+AnwlDaEVFLJL3U
ctxDIDnqpcSSSFpJGW3I10NxRB3JnNo5hYWEW0gxyNE5fQ52FFoLxMG4GX014YMj
ihr7XX1EnJ6ckQocE/TP5x8i963eyV1rfCHJ449HOQOsQ8K5j62dH+CbD96A89De
40OCnDLP3V1Osq/nBbkf9ZdZ0coJmCIhjJRP6I+dMftqCKxt7k9ESl5ijwsNWtSb
8owRtwiQTnNl/o741PxQN1feBGsWlvdCYCz6ELNNaiA3Zx9Wk7Ip/VO2DIfeQVh3

Keybase proof

I hereby claim:

  • I am jat001 on github.
  • I am jat (https://keybase.io/jat) on keybase.
  • I have a public key ASBK24kyPmTrov_-652Zwn2OoFyVFZ134-adLhA2h161eAo

To claim this, I am signing this object:

@jat001
jat001 / denySpamIP.php
Last active February 19, 2020 10:26
Deny the IP address of WordPress spam comment.
<?php
// mysql
$host = 'localhost';
$port = '3306';
$user = 'root';
$passwd = '';
$dbname = 'wordpress';
$server = "$host:$port";
// nginx config file
@jat001
jat001 / global
Last active January 23, 2020 21:01
Xiaomi Mix 2S CN Device (M1803D5XE) + Global ROM + Magisk Solution
#!/system/bin/sh
resetprop ro.product.name mix2s
--------- beginning of main
03-07 07:51:08.446 574 574 W auditd : type=2000 audit(0.0:1): initialized
03-07 07:51:11.079 574 574 I auditd : type=1403 audit(0.0:2): policy loaded auid=4294967295 ses=4294967295
03-07 07:51:11.079 574 574 W auditd : type=1404 audit(0.0:3): enforcing=1 old_enforcing=0 auid=4294967295 ses=4294967295
03-07 07:51:13.719 565 565 W e2fsck : type=1400 audit(0.0:4): avc: denied { read } for name="sda18" dev="tmpfs" ino=24843 scontext=u:r:fsck:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=0
03-07 07:51:13.719 565 565 W e2fsck : type=1400 audit(0.0:5): avc: denied { read write } for name="sda18" dev="tmpfs" ino=24843 scontext=u:r:fsck:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=0
03-07 07:51:13.765 0 577 I SELinux : SELinux: Loaded service_contexts from:
03-07 07:51:13.765 0 575 I SELinux : SELinux: Loaded service_contexts from:
03-07 07:51:13.766 0 577 I SELinux : /vendor/etc/selinux/vndservice_conte
--------- beginning of main
03-07 01:00:31.744 0 581 I SELinux : SELinux: Loaded service_contexts from:
03-07 01:00:31.745 0 579 I SELinux : SELinux: Loaded service_contexts from:
03-07 01:00:31.746 0 579 I SELinux : /system/etc/selinux/plat_service_contexts
03-07 01:00:31.746 0 579 I SELinux : /vendor/etc/selinux/nonplat_service_contexts
03-07 01:00:31.747 0 581 I SELinux : /vendor/etc/selinux/vndservice_contexts
03-07 01:00:25.382 578 578 W auditd : type=2000 audit(0.0:1): initialized
03-07 01:00:28.199 578 578 I auditd : type=1403 audit(0.0:2): policy loaded auid=4294967295 ses=4294967295
03-07 01:00:28.199 578 578 W auditd : type=1404 audit(0.0:3): enforcing=1 old_enforcing=0 auid=4294967295 ses=4294967295
03-07 01:00:31.699 568 568 W e2fsck : type=1400 audit(0.0:4): avc: denied { read } for name="sda18" dev="tmpfs" ino=17055 scontext=u:r:fsck:s0 tcontext=u:object_r:block_device:s0 tclass=blk_file permissive=0