Mac Address Spoofing and Dynamic Hostname on Linux

Functions: changing the mac address and hostname for each boot.

Tip: Run the command as root user. The example code is on debian.

Mac Address Spoofing

Use macchanger to spoof manually

The macchanger (a.k.a., the GNU MAC Changer) provides a variety of features such as changing the address to match a certain vendor or completely randomizing it.

Install the package macchanger from the official repositories.

apt update
apt install macchanger

Display available network interfaces.

ip a

Change the mac address:

macchanger -r your_interface_name

Read More


如果你想要同时验证下载文件的可靠性(拥有者)和完整性(内容),你需要依赖于加密签名。本教程中,将描述如何使用GnuPG(GNU Privacy Guard)来检查文件的可靠性和完整性。

本例中将验证一个从 上下载的磁盘镜像。这个网站中,发行商会提供他们的公钥,还有它用于密钥验证的指纹。

Public Key and Fingerprint


Download Files

安装 GnuPG 并且生成一个键对


sudo apt install gnupg 


sudo yum install gnupg


Gen Key




Read More

Centos 7 下安装Shadowsocks Python 版

本文以Vultr购买的Centos 7主机为例,详细介绍了安装Shadowsocks Python版的方法。建议以密钥的方式绑定主机并以此登录,注意保护好自己的密钥。



yum update


passwd root



yum install fail2ban


systemctl enable fail2ban

Read More

Line and Circular Interpolation on XY Plane

Tips: This is my homework of “Computer Control System” course, so mistakes do happen.

This article will discuss an interpolation algorithms for line and circular. And it provides an implement of C language.

Interpolation Algorithms

Many numerical control machines are powered by stepping motors. When a pulse is sent to a stepping motor, the stepping motor alters its position by a unit step. Two motors can be used to control the XY movements of an arm or tool over a working plane.

If the pulse are generated by a device which can remember or generate a specified train of pulses, repetitive operations such as grinding, painting, or cutting can be performed hunderds of times with virtually no variation. A microcomputer is an obvious choice to gernerate and remember the pulse.

Since stepper motors can move only in discrete steps, we must approximate the actual curve by a series of small XY motions. Many algorithms rely upon parametric functions such as sine and cosine to perform the necessary calculations. Parametric functions, however, typically require a high degree of numeric precision. Calculating sine and cosine values with a microcomputer can be too time-consuming to be useful in a realtime application.

The following two algorithms require no parametric functions. This makes them ideally suited to the computation and memory capacities of microcomputers. Since these algorithms do not require a large amount of complex mathematical calculation, they are fast enough to be used in real-time applications.

Read More

Kali Linux Run Chrome or VLC with Root User


  1. 有些应用之所以在Kali Linux下无法启动,是因为它们不允许以root用户的身份运行,通常,我们可以直接修改相应的二进制文件,将getuid改为getppid,来达到我们的目的。不过这样破坏了安全性,也会因为软件的反复更新,而需要每次做重复的操作。

  2. 我们可以使用gksu -u <username> <bin>的方式来在终端以其他用户的身份启动应用。

  3. usr/share/applications路径下陈列着应用菜单里相应的.desktop文件。其中Exec参数定义了执行的命令。




useradd -m normaluser


gksu -u normaluser google-chrome-stable


gksu -u normaluser /usr/bin/google-chrome-stable %U


Read More