Password
 

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

Password

Started by 6Marilyn6Manson6, 20 December, 2004, 23:22:21

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

6Marilyn6Manson6

Hello.. I request this script with 5 command:

--##   +mypass - Show The User Password
--##   +passwordlist - Will Show Password For Level REG's/ViP's/OP's/Moderator's/Master's/All  
--##   +repass - Change User PassWord
--##   +changepass - Master Can Change user Password
--##   +getpass - Get The User Password  


+mypass   for all registered user and other 4 commands only for master
thanks a lot bye bye

kepp

Here you go..

-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
------
------ Made by ME ( Kepp )
------ Request by : 6Marilyn6Manson6 
------ Date : 2004 - 12 - 21 ( Tuesday )
------ 
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------


-- Set a Bot Name
sBot = "Password"

-- Prefix to use
sPrefix = "+"

-- Commands
sCOM1 = "mypass"
sCOM2 = "repass"
sCOM3 = "changepass"
sCOM4 = "getpass"
sCOM5 = "passwordlist"


-----------------------------------------------------------------------------------
tPassword = {};
tProfiles = {};
-----------------------------------------------------------------------------------
function Main()
	readfrom("../RegisteredUsers.dat")
	while 1 do
		line = read()
		if line == nil then break end
		local s,e,sName,sPassword,sProfile = strfind(line,"(.+)|(.+)|(.+)")
		tPassword[sName] = {Profile = sProfile,Password = sPassword}
	end
	readfrom()

	readfrom("../Profiles.dat")
	while 1 do
		line = read()
		if line == nil then break end
		local s,e,sProfile,sName = strfind(line,"(%d+)|(%S+)|%d+")
		tProfiles[sName] = tonumber(sProfile)
	end
	readfrom()
end
-----------------------------------------------------------------------------------
function DataArrival(user,sData)
	if ( strsub( sData,1,1 ) == "<" ) then
		sData = strsub( sData,1,-2 )
		local s,e,sCmd = strfind(sData,"^%b<>%s+(%S+)")
		if ( strsub( sCmd,1,1 ) == sPrefix ) then
			sCmd = strsub( sCmd,2,-1 )
			sCmd = strlower(sCmd)
			if ( sCmd == sCOM1 ) then
				if (user.iProfile ~= -1) then
					if (tPassword[user.sName]) then
						user:SendData(sBot,"Your password is : \""..tPassword[user.sName].Password.."\", Keep it in a safe place!")
						return 1
					else
						user:SendData(sBot,"For some reason you could not be found!")
						return 1
					end
				end
			elseif ( sCmd == sCOM2 ) then
				if (user.iProfile ~= -1) then
					local s,e,sPass = strfind(sData,"^%b<>%s+%S+%s+(%S+)")
					if sPass and strlen(sPass) >= 4 then
						AddRegUser(user.sName,sPass,3)
						user:SendData(sBot,"Sucessfully changed your password!")
						return 1
					else
						user:SendData(sBot,"Either you didn't enter a password or it was too short, Password must be atleast 4 characters!")
						return 1
					end
				else
					user:SendData(sBot,"You are not registered!")
					return 1
				end
			elseif ( sCmd == sCOM3 ) then
				if (user.iProfile == 0) then
					local s,e,Name,Pass = strfind(sData,"^%b<>%s+%S+%s+(%S+)%s*(%S+)")
					if Name then
						if Pass and strlen(Pass) >= 4 then
							if tPassword[Name] then
								Profile = tonumber(tPassword[Name].Profile)
								AddRegUser(Name,Pass,Profile)
								user:SendData(sBot,"You have sucessfully changed password of "..Name.." to \""..Pass.."\"")
								return 1
							else
								user:SendData(sBot,"\""..Name.."\" is not registered on this hub!")
								return 1
							end
						else
							user:SendData(sBot,"Either you didn't enter a password or it was too short, Password must be atleast 4 characters!")
							return 1
						end
					else
						user:SendData(sBot,"Please enter a name that you will change password for!")
						return 1
					end
				end
			elseif ( sCmd == sCOM4 ) then
				if (user.iProfile == 0) then
					local s,e,Name = strfind(sData,"^%b<>%s+%S+%s+(%S+)")
					if Name then
						if (tPassword[Name]) then
							user:SendData(sBot,"\""..Name.."\"'s Password is : \""..tPassword[Name].Password.."\"")
							return 1
						else
							user:SendData(sBot,"\""..Name.."\" is not registered in this hub!")
							return 1
						end
					else
						user:SendData(sBot,"Please enter a name to get his / hers password!")
						return 1
					end
				end
			elseif ( sCmd == sCOM5 ) then
				if (user.iProfile == 0) then
					local s,e,sPro = strfind(sData,"^%b<>%s+%S+%s+(%S+)")
					if sPro then
						if (tProfiles[sPro]) then
							Idx = GetProfileIdx(sPro)
							Profiles = GetUsersByProfile(sPro)
							sMsg = ""
							for i,v in Profiles do
								sMsg = sMsg.."( "..v.." )\r\nPassword : "..tPassword[v].Password.."\r\n\r\n"
							end
							user:SendData(sBot,"\r\n\r\n"..sMsg)
							return 1
						else
							user:SendData(sBot,"\""..sPro.."\" is not a valid profile name!")
							return 1
						end
					else
						user:SendData(sBot,"Please enter a profile name, etc : "..sPrefix..sCOM5.." VIP")
						return 1
					end
				end
			end
		end
	end
end
Guarding    

6Marilyn6Manson6


SMF spam blocked by CleanTalk