This commit is contained in:
Wolfgang Hottgenroth 2008-07-11 21:21:06 +02:00
parent 41739a40e3
commit f5a0aabe5b
5 changed files with 43 additions and 0 deletions

6
.hgignore.orig Normal file
View File

@ -0,0 +1,6 @@
syntax: glob
*.pyc
.DS_Store
*.o
*~

BIN
client/c/yadync.tgz Normal file

Binary file not shown.

9
client/d/Makefile Normal file
View File

@ -0,0 +1,9 @@
%.o: %.d
gdc -w -c $< -o $@
yadynd: yadynd.o
gdc -w -o $@ $<
.PHONY: clean
clean:
rm *.o yadynd

28
client/d/yadynd.d Normal file
View File

@ -0,0 +1,28 @@
import std.stdio;
import std.socket;
import std.date;
import std.string;
import std.md5;
void main() {
const char[] DYN_ID = "omega";
const char[] SHARED_SECRET = "0m3g@";
const char[] SERVER_IP = "88.198.170.2";
const int SERVER_PORT = 8053;
long time = getUTCtime() / TicksPerSecond;
char[] data = format("%s %s %d", DYN_ID, SHARED_SECRET, time);
ubyte[16] checksum;
sum(checksum, data);
char[] dataToSend = format("%s %d %s", DYN_ID, time, tolower(digestToString(checksum)));
Socket sock = new UdpSocket(AddressFamily.INET);
InternetAddress serverAddress = new InternetAddress(SERVER_IP, SERVER_PORT);
sock.sendTo(dataToSend, serverAddress);
sock.close();
}

BIN
server/entries.db Normal file

Binary file not shown.