just a suggestion.....
 

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

just a suggestion.....

Started by rolipoli, 16 May, 2008, 09:34:30

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rolipoli

-- OpSecurity 0.1 Lua5 modded by The-master for use in new API
-- Small Op Account Protection script
-- by ']['yphoon?
-- thx to Mutor for helping me when being blind/stupid
-- write dynip to disable the check on the user
UserIP = {}
tSetup = {}
sBot = SetMan.GetString(21)
tSetup.Email = "secured@net.nl"
tSetup.OpSecurity = {
	["[NL]-Harrie"] = "10.0.0.3",
	["![DFA-Ma][NL]-Harrie"] = "10.0.0.3",
	} 
OpConnected = function(user)
	CheckUser(user)
end


CheckUser = function(user)
	UserIP[user.sNick] = {user.sIP}
	if tSetup.OpSecurity[user.sNick] then
	Core.SendToNick(user.sNick,"<"..sBot.."> Your IP will be checked")
		local Name = user.sNick
		if ((tSetup.OpSecurity[Name] == user.sIP) or (tSetup.OpSecurity[Name] == "dynip")) then
			local msg = "Welcome "..user.sNick.." your IP Address: [ "..user.sIP..
			" ] matches with your known ip."
			Core.SendToNick(user.sNick,"<"..sBot.."> "..msg)
		else
			local msg = ""
			msg = msg.."\r\n\t\tYou Have Been Banned For Using A Op Account That Don't Belong To You"
			msg = msg.."\r\n\t\tIf YOU really are an Operator at this hub,and just got a new Ip"
			msg = msg.."\r\n\t\tThen Mail to this address "..tSetup.Email
			Core.SendToNick(user.sNick,"<"..sBot.."> "..msg)
			return Core.Kick(user,sBot,"IP: [ "..user.sIP.." ] is out of range"), true
		end
	end
end

This is a good script,but can be modify somehow to identify the connected ops from a secondary passwd. not from the ip number,because the script can't be used,if the ops internet provider give them variable ip number.Sorry pls. for my bad english.

rolipoli

Quote from: Mutor on 30 July, 2008, 19:29:21
Although a secondary password may be used there are other methods.
The more common [and better IMHO] method would be to use the user's host name.
This requires the advent of the socket lib or call to an external app for resolution.
Thx for the answer,but how you would solve it actually,because I,m just a stupid beginner unfortunately

rolipoli


SMF spam blocked by CleanTalk