check outdated passwords

This commit is contained in:
Alexander Popov 2022-01-03 23:25:07 +03:00
parent 8f90574b08
commit 9720dee187
2 changed files with 13 additions and 29 deletions

View File

@ -1,27 +1 @@
# passw0rd_manager
TODO: Write a description here
## Installation
TODO: Write installation instructions here
## Usage
TODO: Write usage instructions here
## Development
TODO: Write development instructions here
## Contributing
1. Fork it (<https://github.com/your-github-user/passw0rd_manager/fork>)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request
## Contributors
- [Alexander Popov](https://github.com/your-github-user) - creator and maintainer

View File

@ -51,12 +51,22 @@ while true
puts "Help:\n-----"
puts ":s - return stats"
puts
elsif password_string.to_s == ":s"
print "Elements: "
print "Elements: ".colorize(:yellow)
puts new_array.size
puts
print "Outdated: ".colorize(:red)
outdated_count = 0
current_time = Time.local.to_unix
a = [] of String
new_array.each do |item|
if item.update + (2629743 * 2) < current_time # 2629743 * 2 -- 2 month
outdated_count += 1
a << item.url
end
end
puts outdated_count
end
new_array.each do |item|