new:wq
This commit is contained in:
parent
41739a40e3
commit
f5a0aabe5b
6
.hgignore.orig
Normal file
6
.hgignore.orig
Normal file
@ -0,0 +1,6 @@
|
||||
syntax: glob
|
||||
*.pyc
|
||||
.DS_Store
|
||||
*.o
|
||||
*~
|
||||
|
BIN
client/c/yadync.tgz
Normal file
BIN
client/c/yadync.tgz
Normal file
Binary file not shown.
9
client/d/Makefile
Normal file
9
client/d/Makefile
Normal 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
28
client/d/yadynd.d
Normal 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
BIN
server/entries.db
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user