dumpnwpass 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/dumpnwpass +52 -0
- metadata +44 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 95f615528dbe0c7e1e329697ad961b3d215b9344
|
4
|
+
data.tar.gz: a06b8b102963f779b1af9a96e14e80113d006ed9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e9435dbff1ce98a67a13e299733021685445b24cbd2509051d4283fe0777f201e7ffc56019251d39104bf6549dd673f7a9dce8627ca98da0dad0c69a0eb35eac
|
7
|
+
data.tar.gz: 5d69ce841f55703ef69bb2db868536e6478f576c6485e885bd9c47a256c1c95889c963b123dc43460b46fe8f25fb52c052e92a549fb2c23d38963b9696113c97
|
data/bin/dumpnwpass
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
(puts "CAN HAZ R00T??? KTHXBYE!!11!";abort) if ENV['USER'] != "root"
|
3
|
+
$DEFPATH = "/etc/NetworkManager/system-connections/"
|
4
|
+
(puts "I can't find the folder with the passwords! Means your system is not affected :)";exit(0)) if !File.exist?($DEFPATH)
|
5
|
+
networks = `ls #{$DEFPATH}`.split("\n")
|
6
|
+
npass = Hash.new
|
7
|
+
|
8
|
+
$macs = false
|
9
|
+
|
10
|
+
ARGV.each_with_index do |arg, index|
|
11
|
+
if arg == "-m"
|
12
|
+
$macs = true
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
$counts = [0,0]
|
17
|
+
|
18
|
+
def is_eth?(f)
|
19
|
+
File.open("#{$DEFPATH}#{f}","r").each_line do |l|
|
20
|
+
($counts[1]+=1;return true) if l.chomp=="type=ethernet"
|
21
|
+
end
|
22
|
+
false
|
23
|
+
end
|
24
|
+
|
25
|
+
def getPass(f)
|
26
|
+
File.open("#{$DEFPATH}#{f}","r").each_line do |l|
|
27
|
+
($counts[0]+=1;return l.chomp.split("psk=")[1]) if l.chomp.match(/^psk=.{1,}$/)
|
28
|
+
end
|
29
|
+
$counts[1]+=1
|
30
|
+
"<[PROBABLY PUBLIC HOTSPOT WITH PAYWALL]>"
|
31
|
+
end
|
32
|
+
|
33
|
+
def getMac(f)
|
34
|
+
return "" if !$macs
|
35
|
+
File.open("#{$DEFPATH}#{f}","r").each_line do |l|
|
36
|
+
(return " | MAC = #{l.chomp.split("mac-address=")[1]}") if l.chomp.match(/^mac-address=.{1,}$/)
|
37
|
+
end
|
38
|
+
return " | MAC = UNKNOWN "
|
39
|
+
end
|
40
|
+
|
41
|
+
networks.each do |n|
|
42
|
+
if is_eth?(n)
|
43
|
+
npass["#{n}#{getMac(n)}"] = "<[ETHERNET]>"
|
44
|
+
else
|
45
|
+
npass["#{n}#{getMac(n)}"] = getPass(n)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
counter = 0
|
50
|
+
npass.each_key{|k|counter=k.length if k.length>counter}
|
51
|
+
puts;npass.each_key{|k|(counter-k.length).times{print(" ")};puts("#{k} => #{npass[k]}")}
|
52
|
+
puts;puts("#{$counts[0]} password(s) dumped, #{$counts[1]} fail(s), #{($counts[0]*100)/networks.length}% success")
|
metadata
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: dumpnwpass
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '1.0'
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- sesshomariu
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-12-10 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Dumps network passwords under Linux
|
14
|
+
email:
|
15
|
+
executables:
|
16
|
+
- dumpnwpass
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- bin/dumpnwpass
|
21
|
+
homepage:
|
22
|
+
licenses: []
|
23
|
+
metadata: {}
|
24
|
+
post_install_message:
|
25
|
+
rdoc_options: []
|
26
|
+
require_paths:
|
27
|
+
- lib
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - ">="
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
requirements: []
|
39
|
+
rubyforge_project:
|
40
|
+
rubygems_version: 2.6.8
|
41
|
+
signing_key:
|
42
|
+
specification_version: 4
|
43
|
+
summary: dumpnwpass
|
44
|
+
test_files: []
|