使用windows有时要临时分享一些文件可以使用caddy的目录浏览功能,简单好用,将以下配置保存caddy目录Caddyfile文件,双击打开caddy.exe即可。
:80 {
gzip
log / stdout "{combined}"
root D:\
browse
}
命令行:
caddy -port 80 -root D:\ browse
发布时间:March 27, 2018 // 分类: // 1 Comment
使用windows有时要临时分享一些文件可以使用caddy的目录浏览功能,简单好用,将以下配置保存caddy目录Caddyfile文件,双击打开caddy.exe即可。
:80 {
gzip
log / stdout "{combined}"
root D:\
browse
}
命令行:
caddy -port 80 -root D:\ browse
发布时间:March 25, 2018 // 分类: // No Comments
IPQ8074 14 nm 4x ARM Cortex A53 2 GHz 64bit
未上市
BCM4908 28nm 4x ARM Cortex A53 1.8 GHz 64bit
GT-AC5300
R8000P AC86U 阉割版BCM4906
IPQ8064 28nm 2x Krait 300 1.4 GHz
R7500 R7800(IPQ8065 2x1.7GHz)
BCM4709 40nm 2x Cortex A9 1.4GHHz
AC88U R8500
MTK:
MT7621N/A 2x MIPS1004Kc 880MHz
k2P
MT7623N/A 4x ARM Cortex-A7 1.3GHz
未上市
MT7622 2x ARM Cortex-A53 1.36GHz 64bit
发布时间:March 21, 2018 // 分类:K2P // No Comments
买了一台别人零元购的k2p a1版(现在新版都是b1),可以刷openwrt类系统,自带系统版本V22.5.7.85。
先开启telnet,访问http://iytc.net/k2p.php根据mac生成配置文件并在路由管理界面恢复配置文件,重新启动telnet就开启了,默认密码为空。
查看当前mtd表信息:
cat /proc/mtd
dev: size erasesize name
mtd0: 01000000 00010000 "ALL"
mtd1: 00030000 00010000 "Bootloader"
mtd2: 00010000 00010000 "Config"
mtd3: 00010000 00010000 "Factory"
mtd4: 00050000 00010000 "permanent_config"
mtd5: 00f60000 00010000 "firmware"
mtd6: 00c48b96 00010000 "rootfs"
mtd7: 00200000 00010000 "rootfs_data"
备份系统固件,并通过路由web下载,详见http://www.right.com.cn/forum/thread-217088-1-1.html
#备份所有
dd if=/dev/mtd0 of=/tmp/all.bin
cd /www
touch all.bin
mount --bind /tmp/all.bin /www/all.bin
#仅备份固件,后续如果恢复官方固件可以在breed界面刷入此固件。
dd if=/dev/mtd5 of=/tmp/fs.bin
cd /www
touch fs.bin
mount --bind /tmp/fs.bin /www/fs.bin
#备份eeprom
dd if=/dev/mtd3 of=/tmp/eeprom.bin
cd /www
touch eeprom.bin
mount --bind /tmp/eeprom.bin /www/eeprom.bin
使用breed刷入别的固件并引导系统,下载breed到http服务器上,自带的wget不支持https,然后在路由器上wget下载到/tmp/目录,
wget -P /tmp/ https://www.haiyun.me/breed-mt7621-phicomm-k2p.bin
mtd -r write /tmp/breed-mt7621-phicomm-k2p.bin Bootloader
Unlocking Bootloader ...
Writing from /tmp/breed-mt7621-phicomm-k2p.bin to Bootloader ...
断电按住重置按钮通电,直到电脑网卡获取到IP,访问192.168.1.1刷入PandoraBox固件
一些初始化设置,iptables:
cat <<EOF > /etc/init.d/iptables
#!/bin/sh /etc/rc.common
START=19
start() {
iptables -F
iptables -X
iptables -Z
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
iptables -N MINIUPNPD
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -i br-lan -j ACCEPT
iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -I FORWARD -i pppoe-wan -o br-lan -j MINIUPNPD
iptables -A FORWARD -i br-lan -o pppoe-wan -j ACCEPT
iptables -A FORWARD -i br-lan -o eth0.2 -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
#iptables -A FORWARD -p tcp --dport 12488 -j ACCEPT
iptables -t nat -F
iptables -t nat -X
iptables -t nat -Z
iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING ACCEPT
iptables -t nat -P OUTPUT ACCEPT
iptables -t nat -N MINIUPNPD
iptables -t nat -I PREROUTING -i pppoe-wan -j MINIUPNPD
iptables -t nat -A POSTROUTING -o pppoe-wan -j MASQUERADE
iptables -t nat -A POSTROUTING -o eth0.2 -j MASQUERADE
#iptables -t nat -A PREROUTING -p tcp --dport 12488 -j DNAT --to-destination 192.168.1.6
}
EOF
/etc/init.d/telnet disable
/etc/init.d/samba disable
/etc/init.d/vsftpd disable
/etc/init.d/firewall stop
/etc/init.d/firewall disable
/etc/init.d/iptables start
/etc/init.d/iptables enable
sed -i 's/downloads.pandorabox.com.cn/pandorabox.beyang.cc/' /etc/opkg/distfeeds.conf
sed -i 's/17.09/17.11/g' /etc/opkg/distfeeds.conf
发布时间:March 14, 2018 // 分类: // No Comments
<?php
$list = array (
'47.74.188.',
'47.74.189.'
);
$pre = array(
'test',
'100mb',
'100MB',
'1000mb',
'1000MB',
'1GB',
'1gb'
);
$ext = array('bin', 'test', 'zip', 'tar.gz');
$filename = array('test');
foreach ($pre as $p) {
foreach ($ext as $e) {
$filename[] = $p.'.'.$e;
}
}
$header = array(
'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0',
'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2',
//'Accept-Encoding: gzip, deflate, br',
'Connection: keep-alive',
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 1);
curl_setopt($ch, CURLOPT_NOBODY, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
foreach ($list as $prefix) {
for ($i = 1; $i < 255; $i++) {
$ip = "http://{$prefix}{$i}/";
curl_setopt($ch, CURLOPT_URL, $ip);
$res = curl_exec($ch);
if ($res) {
foreach ($filename as $v) {
$url = $ip.$v;
curl_setopt($ch, CURLOPT_URL, $url);
curl_exec($ch);
$info = curl_getinfo($ch);
if ($info['http_code'] == 200) {
$size = $info["download_content_length"]/1024/1024;
if ($size > 50) {
echo $url.'------->'.$size.'MB'.PHP_EOL;
file_put_contents('enoctus.log', $url.'------->'.$size.'MB'."\n", FILE_APPEND);
}
} else {
echo $url.'------->'.$info['http_code'].PHP_EOL;
}
}
}
}
}