This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for name in `cat domian.txt`; | |
do | |
nslookup $name| grep -E 'Add|Nam' |awk -v awk_var="$name" '!/#/{printf awk_var" "$2"\n"}' >> dns.txt | |
done | |
awk '{if(NR%2==0){printf $2 "\n"}else{printf "%s ",$0}}' dns.txt > ipoder.txt | |
#sort -k 3 ipoder.txt -o dns.txt | |
#rm -f ipoder.txt | |
awk '{printf "%-40s|%-60s|%-20s\n", $1, $2, $3;}' dns.txt > order.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Mac 上 readlink -f 无法使用的替代代码 | |
TARGET_FILE=$0 | |
cd `dirname $TARGET_FILE` | |
TARGET_FILE=`basename $TARGET_FILE` | |
while [ -L "$TARGET_FILE" ] | |
do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for index in `cat -n $1 | grep -vE '#+\s'| grep -E '#+' | awk '{print $1}'`; | |
do | |
echo "第"$index"行"; | |
arg="sed -i '.bak' '${index}s/\#\{1,\}/& /g' $1" | |
echo $arg | sh | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
# -*- coding=utf-8 -*- | |
# | |
# Author:EMo | |
import requests | |
import re | |
import io | |
import os | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 去除domainArchive的无效文件,保证数据合理性 | |
cmd = "find . -name \"*\" -type f -size 0c | xargs -n 1 rm -f" | |
sub = subprocess.call(cmd,shell=True) | |
if sub == 0: | |
print("Clear vaild file success!") | |
# 获取domainArchive中的domain文件列表 | |
cmd = "ls | grep '[0-9]'" | |
stdout = subprocess.check_output(cmd,shell=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: ErDog | |
# 为了协调Mac上readlink -f无法使用,与脚本功能无关 | |
TARGET_FILE=$0 | |
cd `dirname $TARGET_FILE` | |
TARGET_FILE=`basename $TARGET_FILE` | |
while [ -L "TARGET_FILE" ] | |
do | |
TARGET_FILE=`readlink TARGET_FILE` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding:utf-8 | |
import io | |
import sys | |
import os | |
def uniq_set(file): | |
u_set = set() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [[ $# < 2 ]];then | |
echo "please assign Minnum and Maxnums!" | |
exit 0 | |
fi | |
min=$1; | |
max=$2-$1; | |
num=$RANDOM | |
((retnum=num%max+min)) | |
echo $retnum; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 根据IP和PORT的csv文件,生成URL | |
def targetUrl(filename): | |
urllist = list() | |
with open(filename,"rU") as f: | |
reader = csv.DictReader(f) | |
for row in reader: | |
geturl = { | |
'443': lambda :"https://{}".format(row['IP']), | |
'8080': lambda :"http://{}:{}".format(row['IP'],row["PORT"]), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# coding: utf-8 | |
# Author: EMo | |
import http.client,sys | |
def get_url(host): | |
""" 将域名转换为URL(是否协议与WWW判断) """ | |
global datas | |
conn = http.client.HTTPConnection(host,timeout=3) |
OlderNewer