01: package CustomDNS;
02:
03: import java.lang.Exception;
04: import net.espeak.infra.cci.exception.*;
05: import net.espeak.jesi.*;
06: import ZoneRegistrarIntf;
07:
08: public class StubProxy {
09:
10: public static void main(String[] args) {
11: try {
12: String dnsname = args[0];
13: String address = args[1];
14:
15: ESConnection core = new ESConnection();
16: ESServiceFinder finder = new ESServiceFinder(core,
17: "ZoneRegistrarIntf");
18: ESQuery query = new ESQuery("Name == 'randomhacks.com'");
19: ZoneRegistrarIntf reg = (ZoneRegistrarIntf) finder
20: .find(query);
21:
22: reg.registerAddressForHost(dnsname, address);
23: } catch (Exception e) {
24: System.err.println("StubServer: " + e.toString());
25: System.exit(1);
26: }
27: }
28: }
|