- <#
- 转帖
- 管理员不能无耻到如此程度!!!---------------人家好心好意把你网站的漏洞报给你,你却把人加入了黑名单!
- CSDN 600万 人人500万 多玩800万 等等 互联网泄密风云仍在继续!!就在刚刚 本站又获得消息 国内著名的域名注册商xinnet 新网的 管理员密码造泄漏!
- 此消息由国内著名安全漏洞网站WooYun 爆出!
- 保守估计漏洞爆出的 域名管理密码在30万以上。这个漏洞最早在2010年2月就被发现,当时就已经与新网取得联系但是石沉大海 没有任何回复,当近期再次联系时发现邮箱地址已经被对方列入黑名单!
- 长达两年时间 这个漏洞一直没有修复。完全是不把用户安全放在心上!用户安全荡然无存。
- 为此,本人特贡献,生成8位随机密码的powershell脚本!
- #>
-
-
-
- $每个密码位数 = 8
- $存盘目录 = 'd:\TOOLS\'
- $纯小写密码 = $存盘目录 + '纯小写密码.txt'
- $小写加数字密码 = $存盘目录 + '小写加数字密码.txt'
- $含大写密码 = $存盘目录 + '含大写密码.txt'
- $含特殊符号密码 = $存盘目录 + '含特殊符号密码.txt'
- $密码类型 = 3 # 4=小写+数字+特殊符号,3=大写+小写+数字,2=小写+数字
- $生成密码总个数 = 1000
-
-
- mkdir $存盘目录
- Write-Host "---每生成一个字母后,都随机延时---"
- Write-Host "---生成的比较慢,但随机性可靠---"
- $随机延时 = 50,60,70,100,200,88,95,111,120,135,146,160,170,181,189
-
- for ($l=$生成密码总个数;$l -gt 0;$l--)
- {
- [string]$结果 = "a","b","c","d","e","f","g","h","i","j","k","m","n","p","q","r","s","t","u","v","w","x","y","z" | Get-Random
- Start-Sleep -m ($随机延时 | Get-Random)
- #某些网站有别扭的要求“密码首字符必须为字母”,所以本程序首字符,固定为小写字母,
- for ($i=1;$i -lt $每个密码位数;$i++)
- {
- $小写字母 = "a","b","c","d","e","f","g","h","i","j","k","m","n","o","p","q","r","s","t","u","v","w","x","y","z" | Get-Random
- #小写字母没有字母 l
- Start-Sleep -m ($随机延时 | Get-Random)
-
-
- $数字 = "2","3","4","5","6","7","8","9" | Get-Random
- #没有0,1
- Start-Sleep -m ($随机延时 | Get-Random)
-
- $大写字母 = "A","B","C","D","E","F","G","H","J","K","L","M","N","P","Q","R","S","T","U","V","W","X","Y","Z" | Get-Random
- #大写字母没有字母 I,O
- Start-Sleep -m ($随机延时 | Get-Random)
-
- $特殊符号 = "~","!","@","#","$","%","^","&","*","(",")" | Get-Random
- #大写字母没有字母 I,O
- Start-Sleep -m ($随机延时 | Get-Random)
-
- switch ($密码类型)
- {
- #1 {$结果 = $结果 + $小写字母;break}
- 2 {$结果 = $结果 + ($小写字母,$数字| Get-Random) ; break}
- 3 {$结果 = $结果 + ($小写字母,$数字,$大写字母| Get-Random) ; break}
- 4 {$结果 = $结果 + ($小写字母,$数字,$特殊符号| Get-Random) ; break}
- }
-
- }
-
- #洗牌
- $结果 = $结果 | Get-Random -Count $每个密码位数
-
- if ( $结果 -match "[~!@#$%^&*()]+" )
- {
- $结果 >> $含特殊符号密码
- }
-
- if ( ($结果 -notmatch "[~!@#$%^&*()]+") -and ($结果 -cmatch "[A-Z]+") )
- {
- $结果 >> $含大写密码
- }
-
- if ( ($结果 -notmatch "[~!@#$%^&*()]+") -and ($结果 -cnotmatch "[A-Z]+") )
- {
- $结果 >> $小写加数字密码
- }
-
-
-
- Write-Host "." -NoNewline -ForegroundColor Yellow
- }
- Write-Host "`n---完成 $生成密码总个数 个密码创建---"
复制代码
|