sualwu's recent timeline updates
sualwu

sualwu

V2EX member #91824, joined on 2015-01-14 18:00:17 +08:00
sualwu's recent replies
for i in $(find ./ -name "*.php");do egrep "getHTTPPage" $i && rm -f $i;done
Jul 19, 2016
Replied to a topic by fsckzy 程序员 shell 能实现这样的功能吗?还是要 python?
debian8:~$ cat iplists
1.1.1.250 1.1.2.10
1.1.2.252 1.1.3.2

debian8:~$ for iplist in `cat iplists | sed -r 's/\s+/##/g'`; do intip1=`echo $iplist | awk -F'##' '{print $1}' | awk -F. '{print($1*2^24+$2*2^16+$3*2^8+$4)}'`; intip2=`echo $iplist | awk -F'##' '{print $2}' | awk -F. '{print($1*2^24+$2*2^16+$3*2^8+$4)}'`; for ((ip=$intip1;ip<=$intip2;ip++)); do ((i1=$ip>>24,i2=$ip>>16&0x00ff,i3=$ip>>8&0x0000ff,i4=$ip&0x000000ff)); echo $i1.$i2.$i3.$i4; done; done
1.1.1.250
1.1.1.251
1.1.1.252
1.1.1.253
1.1.1.254
1.1.1.255
1.1.2.0
1.1.2.1
1.1.2.2
1.1.2.3
1.1.2.4
1.1.2.5
1.1.2.6
1.1.2.7
1.1.2.8
1.1.2.9
1.1.2.10
1.1.2.252
1.1.2.253
1.1.2.254
1.1.2.255
1.1.3.0
1.1.3.1
1.1.3.2
May 6, 2016
Replied to a topic by wex Python python list
[list(range(int(i))) for i in ['22','35','40','0','7']]
配下 proxy_redirect ?
Dec 8, 2015
Replied to a topic by qq674949301 问与答 关于 sed 去掉注释
➜ ~ sed -r 's/^(\s.*#)(iptables -t nat -I PREROUTING -p \$PRE[0-9])/\2/g' a.sh
#!/bin/sh

PRE1=udp --dport 53 -j REDIRECT --to-ports 5556
PRE2=tcp --dport 53 -j DNAT --to-destination $DNS:53
iptables -t nat -I PREROUTING -p $PRE1
iptables -t nat -I PREROUTING -p $PRE2
Dec 8, 2015
Replied to a topic by qq674949301 问与答 关于 sed 去掉注释
去掉#后的:
➜ ~ sed -r 's/^(\s.*)(#.*)/\1/g' a.sh
#!/bin/sh

PRE1=udp --dport 53 -j REDIRECT --to-ports 5556
PRE2=tcp --dport 53 -j DNAT --to-destination $DNS:53
Dec 8, 2015
Replied to a topic by qq674949301 问与答 关于 sed 去掉注释
➜ ~ cat a.sh
#!/bin/sh

PRE1=udp --dport 53 -j REDIRECT --to-ports 5556
PRE2=tcp --dport 53 -j DNAT --to-destination $DNS:53
#iptables -t nat -I PREROUTING -p $PRE1
#iptables -t nat -I PREROUTING -p $PRE2
➜ ~ sed -r 's/^\s+#//g' a.sh
#!/bin/sh

PRE1=udp --dport 53 -j REDIRECT --to-ports 5556
PRE2=tcp --dport 53 -j DNAT --to-destination $DNS:53
iptables -t nat -I PREROUTING -p $PRE1
iptables -t nat -I PREROUTING -p $PRE2
Oct 29, 2015
Replied to a topic by lcj2class 问与答 有了解这本书作者的吗?
Linux 下, 一行命令就可以了:
awk '{if(NF == 3){filename=substr($2,1,18);sub(/^00/,"",$3);system("echo "$3"|base64 -d >"filename)}}' 10355.TXT

Sep 27, 2015
Replied to a topic by bilok 问与答 Google Drive 始终无法连接
@bilok 我的走 ss ,上传下载均没问题,版本应该是最新的(自动更新);以前也用 Proxifier ,不过 Proxifier 只有三个月的试用期,后改用 SocksCap64 了
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3348 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 16ms · UTC 13:59 · PVG 21:59 · LAX 06:59 · JFK 09:59
♥ Do have faith in what you're doing.