Hack machine Assembler

A simple implementation of assembler for hack machine language in C++   Github: https://github.com/LevyHsu/Hack-Assembler See : http://www.nand2tetris.org/06.php Compile: g++ -g -std=c++11 -Wall -pedantic -o main.out *.cpp   run: ./main.out test.asm will generate test.hack (with same name)   Debug with extra info: ./main.out test.asm -v   All the white spaces and comments are ignored (content after // in… Read more Hack machine Assembler

Linux Make in C

modifedTime.h #ifndef MODIFIEDTIME_H #define MODIFIEDTIME_H #include <sys/types.h> #include <sys/stat.h> time_t modifedTime(char *path); #endif /* MODIFIEDTIME_H */ modifiedTime.c modifiedTime以time_t返回文件最后一次修改的时间 #include “modifedTime.h” #include <sys/types.h> #include <sys/stat.h> #include <time.h> time_t modifedTime(char *path) { struct stat attr; if (stat(path, &attr) == 0) { return attr.st_mtime; } exit(1); return 0; } doCommand.c doCommand执行Unix命令,无异常返回true,否则false。 #include <stdlib.h> typedef enum { false, true… Read more Linux Make in C

zmap套装之zdns:批量查询域名ip

最近收到全球域名以后想做一个对应的ip list方便用Zgrab扫描 CSV格式: domain,”date added”,”NS servers”,”IP address”,country 用python预处理为一行一个域名: import csv with open(“all.csv”) as cfile: reader = csv.DictReader(cfile) f = open(“all.list”, “w”) for row in reader: print row.get(“domain”) f.write(row.get(“domain”) + “\n”)   安装zmap+Go+zdns yum install zmap git wget wget https://storage.googleapis.com/golang/go1.10.4.linux-amd64.tar.gz tar -C /usr/local -xzf go1.10.4.linux-amd64.tar.gz export PATH=$PATH:/usr/local/go/bin export GOPATH=/usr/local/go/bin/ go get github.com/zmap/zdns/zdns cd /usr/local/go/bin/src/github.com/zmap/zdns/zdns go build… Read more zmap套装之zdns:批量查询域名ip

Linux cp command in C

This is a simple implementation of cp command in linux, if you are student in University of Adelaide who happens to take SPC course, please do not copy this code directly. Code still can be optimized but I’m not gonna fix it since no mark will be given for coding style. CP命令的C实现~ Compile: gcc -o… Read more Linux cp command in C

利用Zgrab绕CDN找真实IP

未经许可转载本帖将视为同意按100元/字支付稿酬 本文已授权在T00LS发布:https://www.t00ls.net/articles-40631.html 1. 安装Zmap yum install zmap git wget   如果提示找不到zmap请自行添加最新的源 CentOS6: yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm   CentOS7: yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm   2. 安装Go 因为yum install不一定能下到最新的go,所以建议手动安装。 wget https://storage.googleapis.com/golang/go1.10.4.linux-amd64.tar.gz tar -C /usr/local -xzf go1.10.4.linux-amd64.tar.gz export PATH=$PATH:/usr/local/go/bin export GOPATH=/usr/local/go/bin/   3. 安装Zgrab go get github.com/zmap/zgrab cd $GOPATH/src/github.com/zmap/zgrab go build   4. Zgrab使用 Zgrab配和Zmap在200M带宽的机器上扫遍国区所有80端口大概是4小时以内(I7+16G+240G SSD RAID 0),网速和硬盘性能比较影响最终速度。至于扫全球的请准备好1T以上的SSD ./zgrab –help… Read more 利用Zgrab绕CDN找真实IP

ShadowSocks go mu + ss panel 添加节点

之前布置Panel+ss后台的时候遇上了不少麻烦 现需要在一台CentOS 7.2的机器上布置ss go mu并使用web api方式连接一台已经配置好的机器,通过redis授权。 首先 [code language=”bash”]yum install go screen git curl redis emacs[/code] 设置Go path: [code language=”bash”]export PATH=$PATH:/usr/local/go/bin export GOPATH=~/.go[/code] 安装ss go mu: [code language=”bash”]go get github.com/orvice/shadowsocks-go cd ~/.go/src/github.com/orvice/shadowsocks-go/mu go get go build[/code] 如果显示:package github.com/orvice/shadowsocks-go: no buildable Go source files in /root/.go/src/github.com/orvice/shadowsocks-go 请忽略 搞个配置文件出来: [code language=”bash”]cp example.conf ~/.go/bin/config.conf emacs ~/.go/bin/config.conf[/code] 其中client后为webapi方式连接(根据作者文档第二选择是mysql,如果使用了webapi,不用理会sql设置) 1.… Read more ShadowSocks go mu + ss panel 添加节点

ShadowSocks 注册

1.点击左上角ShadowSocks (或者直接点击下面的注册码)。 2.按要求注册 (新用户初始10G流量 每日签到随机50M~100M流量)。 3. 在设备上安装客户端 (IOS端推荐Wingy,或者其他任何支持ShadowSocks的App),Win/Mac有提供下载,Linux/Android 可在首页点击客户端下载(需翻墙)。 4.节点列表找到HK,点击进入后内有二维码,扫一扫 上网~ Windows/Mac下也可直接扫描本机屏幕上二维码自动配置。   邀请码点这里   Win/Mac客户端在此: Windows客户端         Mac客户端     更多客户端请访问:Shadowsocks.Org (需翻墙)     如需大流量请联系本人 欢迎捐赠:1FGb7uZoLUixERf2e9fQPHsiTGGwhz3kW5     超过一个月未使用的账号将被清理 请谅解  由于某位使用trashmail注册的用户恶意使用流量 已封停其账号 日志已保留