Socket lib available for ptokax.
Use sockets in your px lua scripts.
Read more here:
http://www.thewildplace.dk/lua/wsa/
/Bluebear
nice work bluebear
i put the file on my Ptx Mirror (http://ptokax.psycho-chihuahua.net/?dir=Scripts/Lua%205%20Scripts/) as well :)
Can you add an option to send TCP-packets with pre-specified flags (like imitating a handshake by sending a SYN flag?)
-- // EDIT
Please consider uploading it to the script database... ;)
Cool stuff bluebear looks really good.
- Opti :D
Thx for the replys :)
btw i created a forum on http://www.thewildplace.dk/ if there is any questions..
To those of you there will use it: Don't expect that i will follow other threads on this board, besides the ones i created myself.
Please use the forum, instead of pm'ing me on hubs where i'm online if you got any support/bug/request questions. Ofcourse your welcome to pm me if you just want a chat :)
If you create scripts that use this lib, I would be happy if you'd share/post it in the forum on my page.
Can you implement a feature that gets the state of a socket?
QuoteOriginally posted by bastya_elvtars
Can you implement a feature that gets the state of a socket?
I could, but the intension is that use a global for it.
For multiply sockets you could use a table.
QuoteOriginally posted by bluebear
QuoteOriginally posted by bastya_elvtars
Can you implement a feature that gets the state of a socket?
I could, but the intension is that use a global for it.
For multiply sockets you could use a table.
sounds like a feature for WsaSocket.lua.
for the peeps who don't know yet.
WsaSocket.lua is a support script for bluebear's library which handles all basic features.
far from done, but here's a example script which shows how easy it works.
function Get1Arg(data)
-- Written by plop
local s,e,sArg = string.find(data, "%b<>%s+%pwhois%s+(%S+)")
if sArg then
return sArg
end
end
-- Ptokax chat arrival
function ChatArrival(user, data)
-- written by plop
local data = string.sub(data, 1, (string.len(data) - 1))
local sArg = Get1Arg(data)
if sArg then
local Sock = require("libs/WsaSocket")
local _Error, sData = Sock.WhoIs(sArg)
user:SendData("WhoisBOT", (_Error or sData))
return 1
end
end
plop
Dedicated wiki page for the manual is up. Read, edit and enjoy! N. B.: the manual is for the upcoming version.