brute-force

Brute force attack test on password for file

浪子不回头ぞ 提交于 2020-03-05 11:46:05
问题 I'm trying to create a brute force that will work on a specific files password. I'm not sure how to get this code to work. This is what I have so far. This code produces the correct possible combinations for the password but I am not sure how to implement this into a brute force attack. my @alpha = qw(a b c d e f g h i j k l m n o p q r s t u v w x y z); my $password = @alpha[1]; my @combo = (); for my $one(@alpha){ for my $two(@alpha){ for my $three(@alpha){ for my $four(@alpha){ push @combo

How does a database get hacked? A question about salting, etc

南笙酒味 提交于 2020-01-24 15:04:19
问题 Bear with me, I have been only learning PHP for only a few weeks, so example code may confuse me. I think I finally understand salting! It's to protect passwords inside database, if breached. What I don't understand is, why would a hacker have to crack hashes if they are trying to figure out a user's password (assuming that's their goal)? Wouldn't this be easier? Is the only defense from password guessing is to implement a limit of password entry X amount of times a day or CAPTCHA? How would

Java all determine elements are same in a list

a 夏天 提交于 2020-01-20 20:08:45
问题 I am trying to determine to see if all elements in a list are same. such as: (10,10,10,10,10) --> true (10,10,20,30,30) --> false I know hashset might be helpful, but i don't know how to write in java. this is the one I've tried, but didn't work: public static boolean allElementsTheSame(List<String> templist) { boolean flag = true; String first = templist.get(0); for (int i = 1; i< templist.size() && flag; i++) { if(templist.get(i) != first) flag = false; } return true; } 回答1: Using the

Java all determine elements are same in a list

ぃ、小莉子 提交于 2020-01-20 20:07:24
问题 I am trying to determine to see if all elements in a list are same. such as: (10,10,10,10,10) --> true (10,10,20,30,30) --> false I know hashset might be helpful, but i don't know how to write in java. this is the one I've tried, but didn't work: public static boolean allElementsTheSame(List<String> templist) { boolean flag = true; String first = templist.get(0); for (int i = 1; i< templist.size() && flag; i++) { if(templist.get(i) != first) flag = false; } return true; } 回答1: Using the

Java all determine elements are same in a list

爷,独闯天下 提交于 2020-01-20 20:06:30
问题 I am trying to determine to see if all elements in a list are same. such as: (10,10,10,10,10) --> true (10,10,20,30,30) --> false I know hashset might be helpful, but i don't know how to write in java. this is the one I've tried, but didn't work: public static boolean allElementsTheSame(List<String> templist) { boolean flag = true; String first = templist.get(0); for (int i = 1; i< templist.size() && flag; i++) { if(templist.get(i) != first) flag = false; } return true; } 回答1: Using the

Simulated Annealing TSP

限于喜欢 提交于 2020-01-20 05:09:42
问题 I'm looking to implement the simulated annealing algorithm in Java to find an optimal route for the Travelling Salesman Problem, so far I have implemented brute force and am looking to modify that code in order to use simulated annealing. Obviously brute-force and simulated annealing are very different and use very different functions. I understand simulated annealing uses a variable known as the temperature which then cools as the algorithm runs; with the temperature starting high and it

Preventing Brute Force Logins on Websites

霸气de小男生 提交于 2020-01-18 05:46:33
问题 As a response to the recent Twitter hijackings and Jeff's post on Dictionary Attacks, what is the best way to secure your website against brute force login attacks? Jeff's post suggests putting in an increasing delay for each attempted login, and a suggestion in the comments is to add a captcha after the 2nd failed attempt. Both these seem like good ideas, but how do you know what "attempt number" it is? You can't rely on a session ID (because an attacker could change it each time) or an IP

How to make all of the permutations of a password for brute force?

倾然丶 夕夏残阳落幕 提交于 2020-01-12 15:48:18
问题 So I was trying to make a program that brute forces passwords. Firstly, I made a program for a password of length 1: password = input('What is your password?\n') chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' def brute_force(): for char in chars: if char == password: return char print(brute_force()) Then I edited it for a password of length 2: def brute_force(): guess = [None, None] for char in chars: guess[0] = char for char2 in chars: guess[1] = char2 if ''.join

How to make all of the permutations of a password for brute force?

血红的双手。 提交于 2020-01-12 15:47:06
问题 So I was trying to make a program that brute forces passwords. Firstly, I made a program for a password of length 1: password = input('What is your password?\n') chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' def brute_force(): for char in chars: if char == password: return char print(brute_force()) Then I edited it for a password of length 2: def brute_force(): guess = [None, None] for char in chars: guess[0] = char for char2 in chars: guess[1] = char2 if ''.join

Number of attempts to brute force an average password / non intrusive yet meaningful limits?

心已入冬 提交于 2020-01-11 19:55:51
问题 There are several useful answers on SO regarding prevention of brute forcing a password of a web service by applying throttling. I couldn't find any good numbers though and I have little expertise in this area, so the question is: How many attempts does it usually take to brute-force an average password of 6 or more characters (with no additional knowledge that may help, but taking into account that passwords are probably prone to dictionary attacks) and based on that, what are meaningful