Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > .NET Languages
You last visited: Today at 02:53

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Help] DNS Protocol

Discussion on [Help] DNS Protocol within the .NET Languages forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2011
Posts: 648
Received Thanks: 413
[Help] DNS Protocol

I like to program my own DNS Server. Please note, that comments refering to other free DNS Servers wont help.



so far, i built async UDP sockets to listen to whatever my network adapter says, the secondary dns is google´s since mine cant resolve yet.


finding the offsets troubles me. All documentation i found was about 1bit sizes, afaik, even a bool in c# has 2 bytes.
I know that the string use Punycode as encoding.

I´ve never implemented a protocol like that and hope some of you got some links or advice.

Once again, dont tell me to use a free dns server and dont question why i want one. Not to be rude or anything, but that wouldnt help at all.

This exceeds my brain:
Y u k i is offline  
Old 11/21/2013, 20:41   #2
 
tolio's Avatar
 
elite*gold: 2932
The Black Market: 169/1/0
Join Date: Oct 2009
Posts: 6,966
Received Thanks: 1,097
wenn ich mich recht entsinne haben die dns pakete eine ein byte großes flag field, also mach dir ne ne eigene sturktur für bits und rechne dann die bits, je nach position zum entsprechenden byte zusammen
tolio is offline  
Thanks
1 User
Old 11/21/2013, 20:43   #3
 
elite*gold: 0
Join Date: May 2011
Posts: 648
Received Thanks: 413
Quote:
Originally Posted by tolio View Post
wenn ich mich recht entsinne haben die dns pakete eine ein byte großes flag field, also mach dir ne ne eigene sturktur für bits und rechne dann die bits, je nach position zum entsprechenden byte zusammen
Dumme frage, aber wie mach ich mir ne bit struktur? Ich kann doch nur bytes auslesen / schreiben? Oder denke ich schon wieder in meiner box

Damit ich jetzt nicht wie ein nixchecker rüberkomm:

PHP Code:
ushort PacketType 0x41f;
            
byte[] Packet = new byte[30];
            
fixed (bytePacket)
            {
                *((
ushort*)p) = (ushort)Packet.Length;
                *((
ushort*)(2)) = PacketType;
                *((
uint*)(4)) = key2;
                *((
uint*)(8)) = key1;
                for (
int i 0ip.Lengthi++)
                {
                    *(
12 i) = Convert.ToByte(ip[i]);
                }
                *((
short*)(28)) = 5816;
            }
            return 
Packet
Das ist so der übliche weg, wie ich meine Pakete für andere Projekte strukturiere. So bald ich alle offsets habe, bin ich glücklich, nur brauch ich auch mehr als ne liste mit namen, ich brauch wenigstens die größe
Y u k i is offline  
Old 11/21/2013, 21:14   #4
 
tolio's Avatar
 
elite*gold: 2932
The Black Market: 169/1/0
Join Date: Oct 2009
Posts: 6,966
Received Thanks: 1,097
entweder du machst es mit nem enum oder halt einfach ne eigene struktur

hier das hat mir mal sehr geholfen weil da beispiele dabei sind:
tolio is offline  
Old 11/22/2013, 07:02   #5
 
elite*gold: 0
Join Date: May 2011
Posts: 648
Received Thanks: 413
Quote:
Originally Posted by tolio View Post
entweder du machst es mit nem enum oder halt einfach ne eigene struktur

hier das hat mir mal sehr geholfen weil da beispiele dabei sind:
Hey danke, war gestern schon etwas müde aber habs heute morgen dann doch noch hinbekommen

Danke!
Y u k i is offline  
Reply


Similar Threads Similar Threads
how to get protocol of L2 GOD?
08/24/2013 - Lineage 2 - 0 Replies
do someone know how to get protocol for L2 GOD Lindvior... share please... Thanks
Protocol
02/11/2011 - Lineage 2 - 5 Replies
Im playing a server which made a new anti bot system the server is freya.When i try to login it says protocol is different so can u help me somehow.
L2 protocol
03/26/2007 - Lineage 2 - 1 Replies
lol yes its me again, sorrie for all tha questions!!.. Im jsut wondering how do you find a privte servers protocol number! Im also wondering coudl someone tell me what exactly a token is and when do u need it??
Protocol help
11/16/2006 - Conquer Online 2 - 4 Replies
I am studying the CO protocol, mainly for fun, partly for studies... Now I strolled upon the first packet sent to the game server... This packet is quite easy, as it probably just gives version and language info, but there is 4 bytes that change all the time... My packet looks like this: 1c 0 1c 4 97 45 8f 0 bc fa 79 5 31 31 37 20 45 6e 67 6c 69 73 68 0 0 0 0 0 or 1c 0 1c 4 97 45 8f 0 bc 4c 25 8 31 31 37 20 45 6e 67 6c 69 73 68 0 0 0 0 0 or 1c 0 1c 4 97 45 8f 0 8a f4 1b 2 31 31 37...
protocol
05/31/2006 - Lineage 2 - 1 Replies
what is the new protocol version for off server after 31 mai update???



All times are GMT +1. The time now is 02:53.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.