-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhashbash.src
More file actions
52 lines (48 loc) · 1.98 KB
/
Copy pathhashbash.src
File metadata and controls
52 lines (48 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//--
//-- $$$$$$$$\ $$\
//-- \____$$ | $$ |
//-- $$ / $$$$$$\ $$ | $$$$$$\ $$\ $$\ $$\
//-- $$ / $$ __$$\ $$ |$$ __$$\ $$ | $$ | $$ |
//-- $$ / $$$$$$$$ |$$ |$$ / $$ |$$ | $$ | $$ |
//-- $$ / $$ ____|$$ |$$ | $$ |$$ | $$ | $$ |
//-- $$$$$$$$\\$$$$$$$\ $$ |\$$$$$$ |\$$$$$\$$$$ |
//-- \________|\_______|\__| \______/ \_____\____/
//--
//--Usage: hashbash [hash] to check bank if password exists, if it does it prints it
//--from the bank. If it does not then it deciphers it and adds it to the bank.
string.color = function(code)
return "<color=""" + code + """>" + self + "</color>"
end function //--"Hello World".color("red")
string.rainbow = function()
colors = ["red", "blue", "white", "orange", "green", "purple", "yellow"]
out = []
for letter in self
out.push(letter.color(colors[ceil(rnd * colors.len - 1)]))
end for
return out.join("")
end function
if params.len != 1 or params[0] == "-h" or params[0] == "--help" then exit("<b>" + ("Usage: " + program_path.split("/")[-1] + " [hash]").rainbow() + "</b>")
comp = get_shell.host_computer
crypto = include_lib("/lib/crypto.so")
if not crypto then crypto = include_lib(current_path + "/crypto.so")
if not crypto then exit("crypto.so not found in /lib or current dir.")
import_code("/home/Zelow/pwdb.src")
if params[0].len != 32 then exit("Invalid hash format. Should be 32 characters long.".rainbow())
result = hashBash(params[0])
if result then
outbound = "Password found in bank: " + hashBash(params[0])
exit(outbound.rainbow())
else
print("Deciphering hash...".rainbow())
pass = crypto.decipher(params[0])
if pass != null then
print pass
outbound = "Deciphered password: " + pass
print(outbound.rainbow())
//--log password in password bank
addData(pass + ":" + md5(pass), HashBank)
//passB.set_content(passB.get_content + char(10) + pass + ":" + md5(pass))
else
print(program_path.split("/")[-1] + " failed.".color("red"))
end if
end if