🧩 ZetoLog

👋 Welcome to my blog site!

  • Writing, coding, and living at my own pace.
  • 写作、编程、以自己的节奏生活。
  • A quiet corner of the web for ideas and growth.
  • 在这片安静的网络角落,记录思想与成长。

How to read and write NFC M1 card?

First of all, this is just a tutorial, there is no complete code. Overview What is the NFC M1 card? The NFC M1 is a passive RFID/NFC card produced by NXP Semiconductors. It has 1 KB of storage, divided into 16 sectors. It operates at 13.56 MHz (High Frequency), which is the standard frequency for NFC. It follows the ISO/IEC 14443-A(Type-A) protocol. For example diagram: Read Card How to read card in Android? First, you should have a android phone of NFC function. You must be enable NFC in your android phone. A empty or useless card. Let’s write code. AndroidManifest.xml Request permissions <uses-permission android:name="android.permission.NFC" /> <uses-feature android:name="android.hardware.nfc" android:required="true" /> MainActivity.kt Define a NFC adapter: private var nfcAdapter: NfcAdapter? = null, NfcAdapter is android.nfc.NfcAdapter Init NFC adapter in MainActivity#onCreate method: this.nfcAdapter = NfcAdapter.getDefaultAdapter(this) Create a override method(For example): If you need to read cards from other SAKs or card models, you will need to write the corresponding multi-branch conditions yourself. ...

February 18, 2026 · 6 min · ZetoHkr

Server list ( My memo :) )

Aisa China HongKong, China VPS Ningbo, Zhejiang, China DS Ningbo, Zhejiang, China VPS Japan Tokyo, Japan IIJ BGP VPS Eurpo Germany Frankfurt, Germany VPS North America United States Los Angeles, United States VPS 1 A400 Los Angeles, United States VPS 2 A400 Los Angeles, United States VPS 3 DMIT

February 1, 2026 · 1 min · ZetoHkr

Risk control script to prevent RDP brute-force attacks

Today, my Windows server account was automatically locked due to a series of login failures (Event ID 4740), preventing me from logging in normally. I urgently checked the firewall rules and found that manually blocking these IPs was too late, and the frequent account lockouts were impacting normal business operations. Overview This script is primarily used to automatically detect IPs that fail to log in via RDP. When the number of failed attempts by the same IP exceeds a threshold within a set time window, its access will be automatically blocked. It can also detect account lockout events (4740) and attempt to unlock locked accounts, reducing manual intervention. ...

November 13, 2025 · 11 min · ZetoHkr

How to easily use Kqueue in C language

This tutorial is designed for macOS or BSD systems. What is kqueue? kqueue is an event notification mechanism in macOS (and BSD systems such as FreeBSD). If you are writing a server, but you don’t want to allocate a thread for each client; you can use kqueue to listen for events from clients, for example: Who just connected? Who disconnected? Which client has sent a message? The system notifies you automatically. Multiple clients can be served by a single thread. This is I/O Multiplexing. kqueue is similar to epoll in Linux and iocp in Windows. This will save resources. ...

November 2, 2025 · 14 min · ZetoHkr

How to Deploy OpenWrt in Proxmox VE (Step-by-Step Guide)

Prerequisite A dedicated server (Pre-installed PVE) Public IP address (Optional, but you must be able to access the server) Internet Getting Started 🚀 Download OpenWrt image file cd /var/lib/vz/template/iso wget https://downloads.openwrt.org/releases/24.10.3/targets/x86/64/openwrt-24.10.3-x86-64-generic-squashfs-combined-efi.img.gz gunzip openwrt-24.10.3-x86-64-generic-squashfs-combined-efi.img.gz You can select other versions and architectures. Click Here Create an empty virtual machine OS tab: Select Do not use any media System tab: BIOS: SeaBIOS Other optional: custom Disks tab: Delete all disk CPU: Select Advanced and set CPU units value is 1024 (Optional) Other optional: custom Memory tab: custom Network tab: Bridge: Select a bridge that can access the Internet Other optional: custom Finish Import image to virtual machine Import image # 101 is your vm id # local is your storage name qm importdisk 101 /var/lib/vz/template/iso/openwrt-24.10.3-x86-64-generic-squashfs-combined-efi.img local Double click imported disk in vm hardware menu Bus/Device: Select SATA Other optional: custom Set vm boot order and add a network interface card Navigate to the vm Options menu Double click Boot Order option, and only select just imported disk, and click OK button Back to Hardware menu Click Add button and select Network Device item in dropdown Bridge: Select a bridge [See Tips] Other optional: custom Tips: Can remain in the same VNet as the first NIC, but only allow one gateway (Subnet or OpenWrt) with DHCP enabled ...

October 22, 2025 · 2 min · ZetoHkr