Недавно наткнулся на интересный Java скрипт – проверка качества ( степени защищенности ) пароля. Т.е. имеем мы к примеру какую либо систему регистрации пользователей в которой пользователь пишет свой пароль и по мере ввода символов система сообщает ему насколько качественный его пароль.
Рецепт хорошего пароля: 1 Длинна пароля должна быть 8 и более символов. 2 Используйте буквы как нижнего так и верхнего регистра. 3 Используйте более чем одну цифру 5 Используйте спецсимволы (!,@,#,$,%,^,&,*,?,_,~). 6 Используйте Leet
Данный скрипт работает по принципу оценки пароля по 100 бальной шкале, присваивая в зависимости от используемых символов определенное количество баллов.
>= 0 баллов : очень слабый
>= 25 баллов: слабый
>= 50 баллов: нормальный
>= 60 баллов: достаточно неплохо
>= 70 баллов: хороший
>= 80 баллов: очень хороший
>= 90 баллов: отличный пароль! Главное не забыть его :)
Итак сам процесс установки данного скрипта ( он достаточно прост и делается буквально за 5 минут )
Сам скрипт, который мы сохраним в файле к примеру pwd_strength.js
// Settings
// -- Toggle to true or false, if you want to change what is checked in the password
var m_strUpperCase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
var m_strLowerCase = "abcdefghijklmnopqrstuvwxyz";
var m_strNumber = "0123456789";
var m_strCharacters = "!@#$%^&*?_~"
// Check password
function checkPassword(strPassword)
{
// Reset combination count
var nScore = 0;
// Password length
// -- Less than 4 characters
if (strPassword.length < 5)
{
nScore += 5;
}
// -- 5 to 7 characters
else if (strPassword.length > 4 && strPassword.length < 8)
{
nScore += 10;
}
// -- 8 or more
else if (strPassword.length > 7)
{
nScore += 25;
}
// Letters
var nUpperCount = countContain(strPassword, m_strUpperCase);
var nLowerCount = countContain(strPassword, m_strLowerCase);
var nLowerUpperCount = nUpperCount + nLowerCount;
// -- Letters are all lower case
if (nUpperCount == 0 && nLowerCount != 0)
{
nScore += 10;
}
// -- Letters are upper case and lower case
else if (nUpperCount != 0 && nLowerCount != 0)
{
nScore += 20;
}
// Numbers
var nNumberCount = countContain(strPassword, m_strNumber);
// -- 1 number
if (nNumberCount == 1)
{
nScore += 10;
}
// -- 3 or more numbers
if (nNumberCount >= 3)
{
nScore += 20;
}
// Characters
var nCharacterCount = countContain(strPassword, m_strCharacters);
// -- 1 character
if (nCharacterCount == 1)
{
nScore += 10;
}
// -- More than 1 character
if (nCharacterCount > 1)
{
nScore += 25;
}
// Bonus
// -- Letters and numbers
if (nNumberCount != 0 && nLowerUpperCount != 0)
{
nScore += 2;
}
// -- Letters, numbers, and characters
if (nNumberCount != 0 && nLowerUpperCount != 0 && nCharacterCount != 0)
{
nScore += 3;
}
// -- Mixed case letters, numbers, and characters
if (nNumberCount != 0 && nUpperCount != 0 && nLowerCount != 0 && nCharacterCount != 0)
{
nScore += 5;
}
return nScore;
}
// Runs password through check and then updates GUI
function runPassword(strPassword, strFieldID)
{
// Check password
var nScore = checkPassword(strPassword);
// Get controls
var ctlBar = document.getElementById(strFieldID + "_bar");
var ctlText = document.getElementById(strFieldID + "_text");
if (!ctlBar || !ctlText)
return;
// Set new width
ctlBar.style.width = nScore + "%";
// Color and text
// -- Безупречный
if (nScore >= 90)
{
var strText = "Отличный пароль! Главное не забыть его :)";
var strColor = "#0ca908";
}
// -- Очень хороший
else if (nScore >= 80)
{
var strText = "Очень хороший";
vstrColor = "#7ff67c";
}
// -- Хороший
else if (nScore >= 70)
{
var strText = "Хороший";
var strColor = "#1740ef";
}
// -- Давольно нормальный
else if (nScore >= 60)
{
var strText = "Достаточно неплохо";
var strColor = "#5a74e3";
}
// -- Нормальный
else if (nScore >= 50)
{
var strText = "Нормально";
var strColor = "#e3cb00";
}
// -- Слабый
else if (nScore >= 25)
{
var strText = "Слабенько";
var strColor = "#e7d61a";
}
// -- Очень плохой
else
{
var strText = "Ужас. (qwerty и то лучше :)) ";
var strColor = "#e71a1a";
}
ctlBar.style.backgroundColor = strColor;
ctlText.innerHTML = "" + strText + " - " + nScore + "";
}
// Checks a string for a list of characters
function countContain(strPassword, strCheck)
{
// Declare variables
var nCount = 0;
for (i = 0; i < strPassword.length; i++)
{
if (strCheck.indexOf(strPassword.charAt(i)) > -1)
{
nCount++;
}
}
return nCount;
}
[b]AMOXIL[/b] is used to treat many different types of infections caused by bacteria, such as ear infections, bladder infections, pneumonia, gonorrhea, and E. coli or salmonella infection.
Active Ingredient: [b]Amoxicillin[/b]
[b]Buying Amoxil Online Uk[/b]
Buy Amoxil 500mg Online
Get Amoxil Online
[url=https://antibioticsline.tumblr.com/]Buy Cheap Antibiotics Online[/url]
Buy Amoxil 500mg Online
[b]Where To Buy Amoxil[/b]
Amoxil In Order Online
[url=https://buydoxycyclineus.tumblr.com/]Purchase Doxycycline Online[/url]
Buy Amoxil Without Prescription
Buy Amoxil No Prescription
Purchase Amoxil Online
Buying Amoxil
[b]Buy Cheap Amoxil Online[/b]
[url=https://neurontn.tumblr.com/]Can I Buy Neurontn Over The Counter[/url]
Buy Amoxil 250mg Online Without Prescription
[b]Buy Amoxil Online Next Day Delivery[/b]
Purchasing Amoxil Online
Buy Amoxil 250mg Online Without Prescription
[url=https://azithrom.webstarts.com/]Azithromycin To Buy Online[/url]
Order Amoxil Online
Get Online Amoxil No Prescription
Get Amoxil Online
[url=http://cpsobsessedforums.com/threads/54599-Buy-cheap-amoxil-online-amoxil-buy-online-no-prescription]Can I Buy Amoxil Online[/url]
Get Online Amoxil No Prescription
Buy Amoxil On Line
Amoxil Without Prescriptions Buy
[b]Get Amoxil 250mg Online[/b]
inetryconydot - 17-01-21 17:01:58
[b]Buy cheap online Antibiotics[/b]
[b]Special offers for Antibiotics[/b]: Amoxil (Amoxicillin), Cipro, [i]Zithromax[/i], Stromectol, Doxycycline, Flagyl ER (Metronidazole), Augmentin, Cephalexin, Biaxin, Omnicef, Prograf, Flagyl... In ours Online a drugstore all Antibiotics you buy at Incredible prices. Buy antibiotics online NOW and save UP to 80%!
[b]Why is your Antibiotics so cheap?[/b]
There is a number of reasons for that. We do not spend anything on marketing, there are no taxes to be paid as the product comes into the country unregistered, the manufacturer is located in an offshore zone and the production costs are way lower. No child labor is used.
[b]How do you ship orders?[/b]
We can offer 2 shipping methods at the moment:
1. Trackable Courier Service: the packages sent by this postal service can by tracked by the tracking number supplied after the order is shipped. See Tracking Your Package for details.
2. International Unregistered Airmail
[url=http://rebizsearch.com/5.html?group=2021¶meter=Antibiotics][b]Buy Antibiotics Online without a prescription[/b]![/url]
Buy Antibiotics online U.S
wholesale Brand Amoxil cheaponline
[b]Buy Antibiotics online cheap[/b]
Antibiotics buy Easily online
Massachusetts Buy Cheap Antibiotics
[b]Antibiotics buy online cheap[/b]
discount Amoxicillin brand drug
[url=http://neurontin.yolasite.com/]Order Neurontin Online Without Prescription Needed![/url]
Online SALE Antibiotics Bellevue with no prescription
Buy Antibiotics without prescription
[b]Best pill price Antibiotics[/b]
Find cheap Antibiotics buy no prescription
[i]Cheap Antibiotics without prescription[/i]
Take cheap Antibiotics online
Long Beach Buy Cheap Antibiotics
Sales online Antibiotics cheap
[b]Buy cheap Antibiotics online[/b]
cheap Amoxicillin without a prescription
Cheap Antibiotics best price
cbd oil that works 2020 - 4-04-20 15:04:21
I simply couldn't depart your web site before suggesting that I actually enjoyed the standard information an individual
supply to your guests? Is going to be again frequently to inspect new posts
cbd oil that works 2020 - 4-04-20 14:04:27
Hello there! I know this is kinda off topic however I'd figured I'd ask.
Would you be interested in trading links or maybe guest writing a blog
article or vice-versa? My website goes over a lot of the same
subjects as yours and I believe we could greatly
benefit from each other. If you happen to be interested feel free to
send me an email. I look forward to hearing from you! Terrific
blog by the way!
sling tv best package 2020 - 24-01-20 09:01:22
Howdy just wanted to give you a brief heads up and let you know a few of
the images aren't loading properly. I'm not
sure why but I think its a linking issue. I've tried it in two different web browsers and both show the same results.
sling tv - 18-01-20 14:01:12
I really like it when people come together and share thoughts.
Great blog, keep it up!
sling tv - 17-01-20 08:01:55
Howdy! I could have sworn I've been to this blog before but
after browsing through some of the post I realized it's new to me.
Anyhow, I'm definitely happy I found it and I'll be book-marking and checking back often!
sling tv - 15-01-20 15:01:35
Hi there every one, here every one is sharing these know-how, so it's good to read this blog,
and I used to visit this blog every day.
sling tv - 14-01-20 02:01:32
Thanks for sharing your thoughts. I truly
appreciate your efforts and I will be waiting for your next post thank
you once again.
sling tv - 7-01-20 14:01:43
Does your site have a contact page? I'm having trouble locating it but,
I'd like to send you an email. I've got some suggestions for your blog you might be interested in hearing.
Either way, great blog and I look forward to seeing it improve over time.
sling tv - 7-01-20 04:01:52
You really make it seem so easy with your presentation but I find this matter to
be really something which I think I would never understand.
It seems too complicated and extremely broad for me. I'm looking forward for your next post,
I will try to get the hang of it!
sling tv - 3-01-20 10:01:14
Greetings from Ohio! I'm bored at work so I decided to check out your blog on my iphone during lunch break.
I really like the information you provide here
and can't wait to take a look when I get home.
I'm surprised at how quick your blog loaded on my phone ..
I'm not even using WIFI, just 3G .. Anyways,
excellent blog!
Hi there! I just wanted to ask if you ever have any problems with hackers?
My last blog (wordpress) was hacked and I ended up losing months of
hard work due to no data backup. Do you have any methods to protect against hackers?
plenty of fish vs match.com free trial - 30-12-19 16:12:18
I do not know whether it's just me or if everybody else experiencing issues with your website.
It appears like some of the written text on your posts are running off
the screen. Can somebody else please provide feedback and let me know if this is happening
to them as well? This could be a issue with my internet
browser because I've had this happen previously.
Kudos
This website was... how do I say it? Relevant!!
Finally I've found something which helped me. Appreciate it!
coconut oil - 16-12-19 10:12:34
My brother suggested I may like this website. He was once entirely right.
This publish actually made my day. You cann't believe simply how a lot
time I had spent for this information! Thanks!
coconut oil - 15-12-19 16:12:53
Excellent beat ! I wish to apprentice while you amend
your website, how could i subscribe for a blog web site?
The account aided me a acceptable deal. I had been a little bit acquainted
of this your broadcast provided bright clear idea
ps4 games - 14-12-19 06:12:55
Hi! Would you mind if I share your blog with my twitter group?
There's a lot of people that I think would really enjoy your content.
Please let me know. Many thanks
ps4 games - 13-12-19 05:12:02
I'm not sure where you are getting your info, but great topic.
I needs to spend some time learning more or understanding
more. Thanks for fantastic info I was looking for this information for my mission.
ps4 games - 11-12-19 04:12:03
It's a pity you don't have a donate button! I'd certainly donate to this outstanding blog!
I guess for now i'll settle for book-marking
and adding your RSS feed to my Google account. I look forward to fresh
updates and will share this site with my Facebook
group. Talk soon!
quest bars cheap - 9-12-19 10:12:39
Why visitors still make use of to read news papers when in this technological world everything is existing on web?
quest bars cheap - 7-12-19 13:12:09
I'm really enjoying the theme/design of your weblog.
Do you ever run into any internet browser compatibility
issues? A couple of my blog readers have complained about my blog not working correctly in Explorer but looks great in Safari.
Do you have any advice to help fix this problem?
ps4 games - 7-12-19 07:12:45
I am sure this post has touched all the internet viewers, its really really fastidious piece of writing
on building up new weblog.
ps4 games - 6-12-19 14:12:52
Thank you for every other informative web site. The place else may just I am
getting that kind of information written in such a perfect approach?
I have a venture that I'm just now working on, and I've been on the look out for such information.
ps4 games - 6-12-19 08:12:07
What's up everybody, here every one is sharing these knowledge, thus it's pleasant to read this blog, and I used to pay a visit this weblog every day.
ps4 games - 5-12-19 23:12:49
Nice post. I learn something totally new and
challenging on sites I stumbleupon on a daily basis.
It's always helpful to read content from other writers and practice a little something
from other web sites.
ps4 games - 4-12-19 23:12:02
Its such as you learn my thoughts! You appear to grasp a lot about this, such
as you wrote the e book in it or something. I think that you could do with some %
to power the message house a bit, however other than that, that is great blog.
A great read. I will definitely be back.
Bredaduff - 4-06-23 23:06:15
爆人気{94;}23;|52;}32;|51;|88;}31;{98;|73;}40;|97;}40;|67;}00;}40;}23;|52;}32;|51;|88;}31;{98;|73;}40;|97;}40;新作|67;}00;}40;|34;大%327;入!655;{75;|14;{75;{83;z90;上$074;{94;素材|34;使用{75;{90;z89;最'640;{94;技"899;{91;z89;丁寧{95;作{87;{83;商品{91;{77;z90;様z93;{94;書'006;{64;{54;{87;{90;z89;$229;低価格{91;$092;入{91;{65;|14;{77;z90;{81;{75;{90;z89;品$074;{95;|18;保#388;{64;{54;{87;{90;z89;本当{95;信&972;{91;{65;|27;{56;{56;店{91;{77;z90;早{67;{71;{85;|25;|08;$984;|03;|14;{75;|23;{58;z90;|68;}40;|72;}15;|73;{94;}23;|52;}32;|51;|88;}31;{98;}02;}21;}31;|89;|73;}40;|97;}40;|67;}00;}40;{71;{85;|25;{99;人気'640;{56;}23;|52;}32;|51;|88;}31;{98;|73;}40;|97;}40;|67;}00;}40;商品|34;{72;提供{56;{83;{75;|14;{77;z90;新作{64;情報満$617;{91;z89;必{78;好{65;{98;|34;#211;{88;{63;|26;|14;{77;z90;品$074;{95;対{75;{90;{99;保#388;{64;{54;{87;{90;z89;信&972;{91;{65;|27;店{91;{77;z90;激安{94;値段{91;z89;'640;級{94;商品|34;$092;入{91;{65;|14;{77;z90;{56;|14;z89;|75;}40;}23;|18;$914;"892;{75;{90;{56;{90;z89;|81;}15;}31;|73;|34;$867;{70;{73;{78;z89;|81;|55;|83;|63;{75;|14;{75;|23;{58;z90;世界$229;人気}02;}21;}31;|89;{98;商品|67;}00;}40;{71;{85;|25;{99;最'640;{94;品$074;{98;商品|34;{72;提供{56;{83;{75;|14;{77;z90;世界{91;|18;{87;{92;'640;{56;}21;}31;|63;{98;}02;}21;}31;|89;z89;例{60;|00;z89;|96;}40;|96;}22;}40;z89;}11;}17;|54;}11;}17;|54;|20;}01;|55;}31;|87;|51;{94;{93;{98;商品|67;}00;}40;{75;{90;z89;品$074;|34;保#388;{91;{65;{90;z89;信用{91;{65;|27;店{91;{77;z90;{81;{75;{90;z89;商品{98;新作情報満$617;{91;z89;好{65;{95;$984;|09;|14;{77;z90;早$895;{71;{85;|25;|08;|81;|55;|83;|63;{75;|14;{75;|23;{58;z90;人気}14;}31;|63;}24;}40;}23;|67;}00;}40;商品{64;登場人気'640;{56;}14;}31;|63;}24;}40;}23;全品|67;}00;}40;|34;$009;売{75;{90;{56;|14;{77;z90;新品{64;情報満$617;{91;z89;{56;{87;|01;{56;書'006;{64;{54;{87;{90;z89;勝手{95;$984;|09;|14;{77;z90;今z89;様z93;{94;|75;}40;}23;{64;$914;"892;{75;{90;{56;{90;z89;$229;低価格{91;'640;品$074;{98;#069;品|34;$092;入{91;{65;{90;z89;|81;}15;}31;|73;|34;掴|35;{91;z89;|81;|55;|83;|63;{75;|14;{75;|23;{58;z90;}}}}}}
https://www.bagssjp.com/product/detail-6742.html
https://www.bagssjp.com/product/detail-2113.html
https://www.bagssjp.com/product/detail-6360.html
https://www.bagssjp.com/product/detail-992.html
https://www.bagssjp.com/product/detail-204.html