DnsLookup - Page 2
 

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

DnsLookup

Started by mars, 03 June, 2012, 18:09:16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mars

Anyway i've tested same versions on x64 win7... but x86 doesn't work for me. Tomorrow i'll try on x32 machine too :)


Hi any news yet

PPK

#26
Quote from: ATAG on 24 September, 2012, 00:55:13
I think, you are the only one, who can find some logic between versions of libs and px builds. We are mortals =)
It is simple, when you use stable PtokaX then you have build 241 and you need libs for 240 and higher. When you are using testing PtokaX build 376 or higher then you need libs for 376 and higher.
In future probably this mess will be fixed, because libs for build 376 and higher use smart loader. They are not compiled against exact PXLua.dll/PXLua-x64.dll version, they simply search pxlua lib for needed lua functions and as long as PXLua.dll/PXLua-x64.dll contains them then they load and work.
Quote from: mars on 24 September, 2012, 01:37:12
can you explain more in detail how you did it in windows 7 as we are still having problems
I'm downloaded http://www.ptokax.org/files/0.4.2.0b401-Lua5.1.5.7z and unpacked to e:\PtokaX\ then i'm downloaded http://www.ptokax.org/files/Libs-376/LuaSocket-2.0.2.7z and unpacked to e:\PtokaX\libs\
Then i'm copied my cfg dir to e:\PtokaX\, added testing script to e:\PtokaX\scripts\, started PtokaX, connected with client and run script  ::)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

mars

Quote from: PPK on 28 September, 2012, 18:02:07I'm downloaded http://www.ptokax.org/files/0.4.2.0b401-Lua5.1.5.7z and unpacked to e:\PtokaX\ then i'm downloaded http://www.ptokax.org/files/Libs-376/LuaSocket-2.0.2.7z and unpacked to e:\PtokaX\libs\
Then i'm copied my cfg dir to e:\PtokaX\, added testing script to e:\PtokaX\scripts\, started PtokaX, connected with client and run script  ::)
Hi PPK

Thanks for the help but we still have the same problem. We downloaded the ptokaX version you linked and extracted it to C:\ptokaX. We then downloaded LuaSocket above and extracted to C:\ptokaX\libs. We used a blank cfg folder. Then we run ptokaX exe (32 or 64-bit) and go to the Scripts tab to add the script. As soon as we try to run any script that starts with (require "socket") we get the following error:

[01:30:15 PM] Syntax C:\ptokaX\scripts\test.lua:1: module 'socket' not found:
   no field package.preload['socket']

This is on Windows 7 64-bit.

mars

Some progress!

Visiting the LuaSocket installation homepage, I tried adding the following to my Win7 environmental variables under user variables:

LUA_CPATH=C:\PtokaX\libs\?.lua;?.lua

LUA_PATH=C:\PtokaX\libs\?.dll;?.dll

Now when I try to run the scripts with require "socket" in I get the following windows error box:

C:\PtokaX\libs\socket.lua is either not designed to run on Windows or it contains an error.

Any help?

ATAG

Ok, it works now!

QuotePtokaX version: 0.4.2.0
PtokaX build: 241
Lua version: Lua 5.1

Loaded Lua libraries:

LuaSocket version: LuaSocket 2.0.2
LuaMime version: MIME 1.0.2

You have to change the "require" to:

require "pxluasocket"
require "pxmime"


I hope it helps...

PPK

Wrong. You must require socket and mime to get this thing working correctly. When you directly require dlls, then it will not work as it should because big part of luasocket is in scripts (socket.lua, mime.lua and others that are loaded by these)  ::)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

ATAG

#31
Ok, i've found the solution  ::)

There is a "scripts" folder in libs with some lua script. We have to copy the scripts to the parent directory (PtokaX\libs) and then it works fine.



mars

Quote from: ATAG on 29 September, 2012, 20:27:40
Ok, i've found the solution  ::)

There is a "scripts" folder in libs with some lua script. We have to copy the scripts to the parent directory (PtokaX\libs) and then it works fine.



Thank you!

While this still did not solve my problem, I tried it on 2 other PCs (Win7 64) and it now seems to work on both. I tested PPKs first dnslookup script and it ran with no errors, and allowed me to run !dnslookup from the client.

A big thanks to both of you :)

Now just one other small question about the second DNS script that PPK posted: is it possible that before kicking someone with a "nil" dnslookup, is it possible to first check another DNS? Why I ask is that sometimes our private DNS server goes down so no one has DNS, and then I do not want the script to kick everyone.

So something like this:

1 - Check DNS of IP x.x.x.x
2 - If (1) returns valid DNS, check IP of sUser
3 - If (2) returns nil value, kick sUser and send message to Ops

Is something like this possible?

mars

Hi PPK

After many problems we finally got LuaSocket and your DNS scripts to run on out hub, but now we have another problem.

When the client runs the dnslookup, it does not use the OS DNS server (the one that is specified in TCP/IP settings). Instead it only returns the computer name that is set in Windows. This means that even if the users did not update their DNS details on out database they will not be kicked by the script because it will always return their computer name.

Is there someway to specify that the script used the OS DNS instead of just the computer name?

Thanks

SMF spam blocked by CleanTalk