Can somebody give me script that shows passwords.
Is it posible to show passwords only for masters?
Hope this is something like yr looking for, dug this out of my script archive has been run and it works... not an expert on scripts so if you need it re-fining for owners only ide ask someone who is comfortable with lua scripting.. :D 8)
-- simple standalone get-password-by-nick-bot by bonki 09/06/03
sBotName = "Bot-name";
sGetPasswdPhrase = "!getpasswd";
sPasswdFile = "../RegisteredUsers.dat";
function DataArrival(curUser, sData)
local _, _, cmd, args = strfind(sData, "%b<>%s+(%S+)%s*([^%|]*)%|$");
if(cmd == nil) then
return 0; end
cmd = strlower(cmd);
if (cmd == sGetPasswdPhrase) then
curUser:SendData(sData);
if (curUser.bOperator) then
if (strlen(args) > 0) then
local sPasswd = GetPassword(args);
if (sPasswd) then
curUser:SendData(sBotName, args.."'s password is: '"..sPasswd.."'");
else
curUser:SendData(sBotName, "User "..args.." doesn't exist!");
end
else
curUser:SendData(sBotName, "Syntax: "..sGetPasswdPhrase.." ");
end
else
curUser:SendData(sBotName, "You don't have sufficient rights to run that command!");
end
return 1;
end
return 0;
end
function GetPassword(sFrom)
local flPasswdFile = openfile(sPasswdFile, "r");
local line = "";
sFrom = strlower(sFrom);
if (flPasswdFile) then
line = read(flPasswdFile);
while (line) do
_, _, sNick, sPasswd = strfind(line, "^(%S+)|(%S+)|");
if (strlower(sNick) == sFrom) then
return sPasswd;
end
line = read(flPasswdFile);
end
closefile(flPasswdFile);
end
return nil;
end
Can operator see those passwords. I hope not.
as i say im no expert on scripts, it is currently vis by ops, im sure someone out there can help ya more than i can, think the bit that could need altering is the
if (curUser.bOperator) part at a guess, but dont have time to play with it and test it due to work.... hope it helps ya anyhow
Hi,
Only for masters...
-- simple standalone get-password-by-nick-bot by bonki 09/06/03
sBotName = "Bot-name";
sGetPasswdPhrase = "!getpasswd";
sPasswdFile = "../RegisteredUsers.dat";
function DataArrival(curUser, sData)
local _, _, cmd, args = strfind(sData, "%b<>%s+(%S+)%s*([^%|]*)%|$");
if(cmd == nil) then
return 0; end
cmd = strlower(cmd);
if (cmd == sGetPasswdPhrase) then
curUser:SendData(sData);
if (curUser.iProfile == 0) then
if (strlen(args) > 0) then
local sPasswd = GetPassword(args);
if (sPasswd) then
curUser:SendData(sBotName, args.."'s password is: '"..sPasswd.."'");
else
curUser:SendData(sBotName, "User "..args.." doesn't exist!");
end
else
curUser:SendData(sBotName, "Syntax: "..sGetPasswdPhrase.." ");
end
else
curUser:SendData(sBotName, "You don't have sufficient rights to run that command!");
end
return 1;
end
return 0;
end
function GetPassword(sFrom)
local flPasswdFile = openfile(sPasswdFile, "r");
local line = "";
sFrom = strlower(sFrom);
if (flPasswdFile) then
line = read(flPasswdFile);
while (line) do
_, _, sNick, sPasswd = strfind(line, "^(%S+)|(%S+)|");
if (strlower(sNick) == sFrom) then
return sPasswd;
end
line = read(flPasswdFile);
end
closefile(flPasswdFile);
end
return nil;
end
Best regards, nErBoS
Thank you nErBoS. You are the best!
Quick nErBoS...
Found This in my locker..
----------------------------------------------------------------------
--/Password bot by Phatty 0.2
--/29oct03
Bot = "Keiko"
Baduser = " is trying to access the passwords, so i am disconnecting him/her"
Command = "!allpass"
function DataArrival(user,data)
if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
if cmd == Command then
if (user.iProfile==GetProfileIdx("Master") or user.iProfile==GetProfileIdx("SU")) then
readfrom("../registeredusers.dat")
while 1 do
line = read()
if line == nil then break end
user:SendData(Bot,line)
end
readfrom()
end
else
SendToAll(Bot,user.sName..Baduser)
user:Disconnect()
end
end
end
----------------------------------------------------------------------