IP BOT
 

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

IP BOT

Started by kunal, 04 July, 2005, 19:37:22

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kunal

Can anyone make me a script for finding ip of users
eg if when we use !ip kunal
his ip is 202.66.54.2
likeways !ip 202.66.54.2
his nick kunal

jiten

QuoteOriginally posted by kunal
Can anyone make me a script for finding ip of users
eg if when we use !ip kunal
his ip is 202.66.54.2
likeways !ip 202.66.54.2
his nick kunal
Search the forum for "IP finder" by Dessamator.

Cheers


Markitos

QuoteOriginally posted by kunal
gimme the link
Learn
how to seach in the forum
 Click
here for the script


Markitos\

kunal

hey it just the nick using the ip and not ip of the nick
for example it finds !findip 202.54.66.2
nick kunal and not
!findnick kunal
202.54.66.2

kunal

the script works fine but i have 1 problem
when i try to use the ptokax inbuilt cmds it comes
Syntax Error, Syntax = !getip
when i stop the script the inbuilt cmds work properly
pls help

CaSaNoVa

To show the message in pm?only for who do it.

CaSaNoVa

Don't work...nothing in pm...nothing in main  ?(

CaSaNoVa

--IPLog 1.0b LUA 5
--
--by Mutor 7/3/05
--requested by bigfnpump
--
-- Logs user IP & Nick, get info by command
-- Provides right click menu
--
--   +Changes from 1.0
--      +Now retrieves IP from nick input as well as nick from IP input
--
--User Settings----------------------------------------------------------------------------------------------------------------
--
--//-- Botname pulled from the hub
Bot = frmHub:GetHubBotName()
Prefix = "!"         -- Command Prefix
IpCmd = "getip"         -- Get IP User Command
IpMenu = frmHub:GetHubName()   -- Menu name pulled form hub, uses hub name for menu
SubMenu0 ="IP Log"      -- Custom submenu
IPFile="IPLog.dat"
--//--Set your profiles here.
--profile_idx, Commands/Menus enabled [0=no 1=yes], "Profile Name"
IpProfiles = {
[-1] = {0,"Unregistered User"},
[0] = {1,"Master"},
[1] = {1,"Operator"},
[2] = {1,"Vip"},
[3] = {0,"Registered User"},
[4] = {1,"Moderator"},
}
--
--End User Settings-------------------------------------------------------------------------------------------------------------

function Main()
   if loadfile(IPFile) ~= nil then
      dofile(IPFile)
   else
      IPLog ={}
      Save_File(IPFile,IPLog,"IPLog")
   end
end

function OnExit()
Save_File(IPFile,IPLog,"IPLog")
end

function NewUserConnected(user, data)
local timein=os.date("%B %d %Y %X ")
IPLog[user.sIP]={user.sName,timein}
Save_File(IPFile,IPLog,"IPLog")
   for k,v in IpProfiles do
      if k == user.iProfile then
         if (v[1] == 1) then
         user:SendData(Bot, v[2].."'s IP Log commands enabled. Right click hub tab or user list for command menu.")
         end
      break
      end
   end
end

OpConnected = NewUserConnected

function ChatArrival(user, data)
data = string.sub(data, 1, string.len(data)-1)
local s,e,pre,cmd = string.find(data, "%b<>%s+(%p)(%S+)")
local s,e,addy = string.find(data, "%s(%d+%.%d+%.%d+%.%d+)|$")
local s,e,nick = string.find(data, "%s(%S+)|$")
   for k,v in IpProfiles do
      if k == user.iProfile then
         if (v[1] == 1) then
            if pre and pre==Prefix then
               if (cmd==IpCmd) then
                  if nick and nick ~= addy then
                     for i,v in IPLog do
                        if v[1]==nick then
                           local reply2="\r\n\r\n\tL'Utente "..v[1].." ? stato nell'hub "..
                           "ed ha usato quest'Ip "..i.." il "..v[2]..".\r\n\r\n"
                           user:SendData(Bot,reply2)
                           break
                        end
                     end
                     return 1
                  end
                  if addy and IPLog[addy]==nil then
                     local errmsg="\r\n\r\n\tL'indirizzo Ip "..addy.." non ? stato trovato nel file log.\r\n"
                     user:SendData(Bot,errmsg)
                     return 1
                  else
                     for i,v in IPLog do
                        if i==addy then

                           local reply1="\r\n\r\n\tL'indirizzo Ip "..i.." ? stato usato  "..
                           "da "..v[1].." il "..v[2]..".\r\n\r\n"
                           user:SendData(Bot,reply1)
                           break
                        end
                     end
                     return 1
                  end
               elseif pre and cmd and not addy then
                     user:SendData(Bot,"\r\n\r\n\tSyntax Error, Syntax = "..Prefix..IpCmd.." \r\n")
               return 1
               end
            end
         end
      break
      end
   end
end

Save_Serialize = function(tTable, sTableName, hFile, sTab)
   sTab = sTab or "";
   hFile:write(sTab..sTableName.." = {\n" );
   for key, value in tTable do
      local sKey = (type(key) == "string") and string.format("[%q]",key) or string.format("[%d]",key);
      if(type(value) == "table") then
         Save_Serialize(value, sKey, hFile, sTab.."\t");
      else
         local sValue = (type(value) == "string") and string.format("%q",value) or tostring(value);
         hFile:write( sTab.."\t"..sKey.." = "..sValue);
      end
      hFile:write( ",\n");
   end
   hFile:write( sTab.."}");
end

Save_File = function(file,table , tablename )
   local hFile = io.open (file , "w")
   Save_Serialize(table, tablename, hFile);
   hFile:close()
end


I'm using this,how can message goes in pm to how can do command?

CaSaNoVa


GeceBekcisi

Can someone modify this script to show history of IPs used by a nick, and nick used by an IP?

Thanks..
Do you need an advanced user handling script? Download UserBekcisi today (Latest Edit)
Features: User + ISP + GeoIP database, user info + share checking and many more...

Dessamator

it can be modded but something like that already exists, try using the last version of StatLogger
Ignorance is Bliss.

GeceBekcisi

#12
I just need a script in such a way:
 !ipinfo 127.0.0.1


===========================
IP 127.0.0.1 is currently used by (2) users:
===========================
GeceBekcisi
GecceBekcisi
===========================

 !iprangeinfo 192.168.1.1-192.168.1.100


===========================
There is (2) Users in IP range 192.168.1.1 - 192.168.1.100
===========================
GeceBekcisi,	with IP 192.168.1.2
GecceBekcisi, 	with IP 192.168.1.3
===========================

 !iprangeinfo 192.168


===========================
There is (4) Users in IP range 192.168.1.1 - 192.168.255.255
===========================
GeceBekcisi,	with IP 192.168.1.2
GecceBekcisi,	with IP 192.168.1.3
GeBecisi,		with IP 192.168.2.64
GeeBeki,		with IP 192.168.1.3
===========================

 !iphistory 127.0.0.1


===========================
IP 127.0.0.1 is used by (3) users:
===========================
G3c3Bekcisi, 	on 10.08.2005 - 10:20
GeceB3kc1s1, 	on 10.08.2005 - 10:25
G3c3Bekcisiiii, 	on 10.08.2005 - 10:27
===========================

 !iphistory GeceBekcisi

===========================
User GeceBekcisi have used (8) IPs since 10.08.2005:
===========================
127.0.0.1,		on 10.08.2005 - 10:30
192.168.1.2, 	on 10.08.2005 - 10:35
192.168.1.3, 	on 10.08.2005 - 10:37
192.168.1.6, 	on 10.08.2005 - 10:39
192.168.1.50, 	on 10.08.2005 - 10:41
192.168.1.42, 	on 10.08.2005 - 10:45
192.168.1.55, 	on 10.08.2005 - 10:51
192.168.1.52, 	on 10.08.2005 - 10:52
===========================

 !iphistory GeceBekcisi 5

===========================
Last (5) IPs used by GeceBekcisi:
===========================
192.168.1.6, 	on 10.08.2005 - 10:39
192.168.1.50, 	on 10.08.2005 - 10:41
192.168.1.42, 	on 10.08.2005 - 10:45
192.168.1.55, 	on 10.08.2005 - 10:51
192.168.1.52, 	on 10.08.2005 - 10:52
===========================

This script would be the ultimate IP bot then :D
Do you need an advanced user handling script? Download UserBekcisi today (Latest Edit)
Features: User + ISP + GeoIP database, user info + share checking and many more...

Dessamator

wow, thats a database not an ip bot, lol, lets hope mutor is up to it !
Ignorance is Bliss.

bastya_elvtars

#14
The following data structure should be considered (as everything you want to do can be done using it):

iptable=
  {
    [decimal_ip_1]=
      {
        ["user1"]=1,
        ["user2"]=1,
        -- etc.
      },
    [decimal_ip_2]=
      {
        ["user3"]=1,
        ["user4"]=1,
        -- etc.
      },
    -- etc.
  }

The decimal ip conversion looks like:

a.b.c.d -- normal ip

a*256^3+b*256^2+c*256+d -- decimal IP

Hope I could help you.
Everything could have been anything else and it would have just as much meaning.

GeceBekcisi

#15
Sorry but I dont know how to use tables.. I have to study LUA more..
Do you need an advanced user handling script? Download UserBekcisi today (Latest Edit)
Features: User + ISP + GeoIP database, user info + share checking and many more...

bastya_elvtars

QuoteOriginally posted by GeceBekcisi
Sorry but I dont know how to use tables.. I have to study LUA more..

http://ptxwiki.psycho-chihuahua.net/wikka.php?wakka=LuaOnTables
Everything could have been anything else and it would have just as much meaning.

GeceBekcisi

Wow thats a great how to thanks for the link..
Do you need an advanced user handling script? Download UserBekcisi today (Latest Edit)
Features: User + ISP + GeoIP database, user info + share checking and many more...

bastya_elvtars

QuoteOriginally posted by GeceBekcisi
Wow thats a great how to thanks for the link..

Another reason to use the links in my sig... :D
Everything could have been anything else and it would have just as much meaning.

SMF spam blocked by CleanTalk