I am looking for !getpasswrd script
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

I am looking for !getpasswrd script

Started by Janhouse, 16 April, 2004, 13:43:43

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Janhouse

Can somebody give me script that shows passwords.
Is it posible to show passwords only for masters?

Percyonline

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
aka (UKR)Nemesis  :rolleyes: Why is it when you buy a tin of evaporated milk the tin is always full ??   answers on a post card please....    8)

Janhouse

Can operator see those passwords. I hope  not.

Percyonline

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
aka (UKR)Nemesis  :rolleyes: Why is it when you buy a tin of evaporated milk the tin is always full ??   answers on a post card please....    8)

nErBoS

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
--## nErBoS Spot ##--

Janhouse

Thank you nErBoS. You are the best!

[G-T-E]Gate?

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
----------------------------------------------------------------------

SMF spam blocked by CleanTalk