SA-MP Forums Archive
[Plugin] DNS Plugin - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Plugin Development (https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: [Plugin] DNS Plugin (/showthread.php?tid=75605)

Pages: 1 2 3


Re: [REL] DNS Plugin v2 - Joske_Vermeulen - 21.05.2009

check your inbox @ sa-mp forum


Re: [REL] DNS Plugin v2 - Joske_Vermeulen - 22.05.2009

For those who have a windows server and get this error and the plugin is inside the plugins folder

Код:
Loading plugin: dns.dll
Failed.

Script[gamemodes|filterscripts/x.amx]: Run time error 19: "File or function is not found"
download this new compiled dns.dll by Incognito.

download


Re: [REL] DNS Plugin v2 - watkijkje - 25.05.2009

If someone has a Dynamic IP and that IP changes,
does his hostname changes too?




Re: [REL] DNS Plugin v2 - Joske_Vermeulen - 25.05.2009

Quote:
Originally Posted by watkijkje
If someone has a Dynamic IP and that IP changes,
does his hostname changes too?
no, it will resolve the same hostname unless you use a proxy or change internet provider


Re: [REL] DNS Plugin v2 - Incognito - 27.05.2009

To expand slightly on that: yes, in that case, the entire hostname will change, but the top-level hostname label (i.e., the part that designates the ISP) will not. For example, if your hostname is 127-0-0-1.my.isp.com, but your IP address changes while you are still on the same ISP, then the last part (my.isp.com) will stay the same.

Over the past few days, I have worked with Contador to resolve compatibility issues with the plugin. It should work fine now on Windows and most Linux distributions. Please inform me if there are any problems.


Re: [REL] DNS Plugin - SMX - 29.05.2009

Quote:
Originally Posted by Kye
I wanted to make a comment about this.

Reverse DNS is obviously very useful if you need to ban players on a hostmask say: *.their-isp.com. You could check the host off on connect and Kick() them. But:

Reverse DNS takes time to resolve and it's the duty of an SA-MP script to return execution to the server as quickly as possible. Calling this function will likely delay execution and result in lag for other players while the reverse DNS lookup is occuring. The only way to do this properly is for the DNS lookup to be threaded and call a callback like OnPlayerReverseDNS(playerid, rdns_string[]).

Doesn't it cause problems if you have a different thread call functions in the AMX?



Re: [REL] DNS Plugin v2.1 - Incognito - 02.06.2009

I would like to note one final update (hopefully): I have resolved segmentation faults in Linux by executing callbacks from the main thread. The only way I could figure out how to do this was to create a new function, dns_poll_events, which must now be called on a timer somewhere in the script. Look at my updated banhost.pwn for an example.


Re: [REL] DNS Plugin v2.1 - hansen111 - 02.06.2009

Quote:
Originally Posted by Incognito
I would like to note one final update (hopefully): I have resolved segmentation faults in Linux by executing callbacks from the main thread. The only way I could figure out how to do this was to create a new function, dns_poll_events, which must now be called on a timer somewhere in the script. Look at my updated banhost.pwn for an example.
This is the only way i have found to make things completely thread safe using a plugin, a polling scheme that polls plugin for updates. I guess you did this for windows also?


Re: [REL] DNS Plugin v2.1 - Littl3j0hNy - 02.06.2009

Hi, nice plugin.
But i need a Command like that: /banhost [playerid]
I have try it but it doesn't works.

- LJ


Respuesta: [REL] DNS Plugin v2.4 - DarkChildren - 09.08.2010

mmmm use it aver that this is nice and tanks for job


Re: [REL] DNS Plugin v2.4 - BP13 - 09.08.2010

How are you suppose to do the banhost. I tried it and I can't figure it out can I have a example?


Re: [REL] DNS Plugin v2.4 - nemesis- - 15.08.2010

Quote:
Originally Posted by BP13
Посмотреть сообщение
How are you suppose to do the banhost. I tried it and I can't figure it out can I have a example?
You have to parse the output. It is period (or fullstop for you brits) separated so parse(sscanf) it by that. The problem is host name formats are non-standard so your best bet is banning by domain name by getting whats on the left and right of the last period.


Re: [REL] DNS Plugin v2.4 - TheInnocentOne - 09.09.2010

Could you add another parameter to OnDNS and OnReverseDNS to tell if the lookup was successful? It really need it


Re: [REL] DNS Plugin v2.4 - nemesis- - 09.09.2010

Quote:
Originally Posted by TheInnocentOne
Посмотреть сообщение
Could you add another parameter to OnDNS and OnReverseDNS to tell if the lookup was successful? It really need it
Compare IP vs. Host in the callbacks. If they match, the lookup failed.

pawn Код:
if(!strcmp(ip,host))
{
 //failed
}
else
{
 //succeeded
}



Re: [REL] DNS Plugin v2.4 - sarahlatigresse - 04.01.2011

Hello, I'm not sure what else a script needs to have in it for GetPlayerHost(playerid) to return the hostname.

I have dns.dll in the plugins folder and have it in server.cfg, and #include <dns> at the top, and it compiles fine. Maybe I'm missing something because I don't understand what it means to "add the plugin's natives and callbacks".

Edit: I added this and it's triggered after it does GetPlayerHost(playerid):

Код:
public OnReverseDNS(ip[], host[], extra)
{
	new msg[128];
	format(msg, sizeof(msg), "Your hostname is %s.", host);
	SendClientMessage(extra, COLOR_RED, msg);

	return 1;
}
So I was able to do what I needed to by having it do GetPlayerHost(playerid) when they connect, and storing the result when OnReverseDNS is triggered. Now I'm just wondering if it's still possible for GetPlayerHost to return the hostname like in the example.


Re: [REL] DNS Plugin v2.4 - Sunday_Driver - 11.08.2011

Awesome plugin.


Re: [REL] DNS Plugin v2.4 - EviLpRo - 11.08.2011

i do not understand..

why not used with:

GetPlayerIP(playerid); ?


Respuesta: [REL] DNS Plugin v2.4 - RcoN! - 02.09.2011

who that has used this plugin has some host to add to the list banned_host?


Re: [REL] DNS Plugin v2.4 - GangsTa_ - 03.09.2011

Quote:
Originally Posted by EviLpRo
Посмотреть сообщение
i do not understand..

why not used with:

GetPlayerIP(playerid); ?
This gets the host I guess. Try tracing your ip and see what host do you have, and then you'll understand what is this used for.


Re: [REL] DNS Plugin - leong124 - 18.10.2011

Quote:
Originally Posted by Kalcor
Посмотреть сообщение
I wanted to make a comment about this.

Reverse DNS is obviously very useful if you need to ban players on a hostmask say: *.their-isp.com. You could check the host off on connect and Kick() them. But:

Reverse DNS takes time to resolve and it's the duty of an SA-MP script to return execution to the server as quickly as possible. Calling this function will likely delay execution and result in lag for other players while the reverse DNS lookup is occuring. The only way to do this properly is for the DNS lookup to be threaded and call a callback like OnPlayerReverseDNS(playerid, rdns_string[]).
I think this can only ban the whole ISP, or ban one player like Ban(playerid);