Skip to content

Instantly share code, notes, and snippets.

View firedent's full-sized avatar
🦁

Shichao Zhang firedent

🦁
View GitHub Profile

Keybase proof

I hereby claim:

  • I am firedent on github.
  • I am zscself (https://keybase.io/zscself) on keybase.
  • I have a public key ASAeQbIgWvstKSnF0r6G0LktURNTsDlJ1OdgJ0mT3PhwMwo

To claim this, I am signing this object:

@firedent
firedent / sniff_and_attack.py
Last active February 19, 2021 16:44
sniff unauthorized client and attack with ARP poisoning.
#! /usr/bin/env python
from scapy.all import *
from scapy.layers.l2 import ARP, Ether
import time
import threading
# 合并通知
notic_inter = 600
# 攻击持续时间(秒)
attack_reset = 30
@firedent
firedent / 开平方-二分法实现
Last active December 30, 2016 11:37
开平方函数的C语言实现
// Created by zscself on 2016/12/20.
#include <stdio.h>
double ssqrt(int v,double t){
double double_v = (double) v;
double mid,midd,midSubT,midAddT,low = 0, high = double_v;
while(1){
mid = (low + high)/2;
midd = mid * mid;
midSubT = mid - t;
midAddT = mid + t;