Exemple #1
0
 @SubscribeEvent
 public void onPlayerTick(TickEvent.PlayerTickEvent event) {
   if (event.player == player) {
     for (EntityPlayer player1 : player.worldObj.playerEntities) {
       boolean pokemob;
       PokeInfo info = proxy.getMap().get(player.getUniqueID());
       if (info == null) {
         proxy.getPokemob(player);
         info = proxy.getMap().get(player.getUniqueID());
         pokemob = info != null;
         pokemob = pokemob && player.getEntityData().getBoolean("isPokemob");
       } else {
         pokemob = player.getEntityData().getBoolean("isPokemob");
       }
       PacketBuffer buffer = new PacketBuffer(Unpooled.buffer(6));
       MessageClient message = new MessageClient(buffer);
       buffer.writeByte(MessageClient.SETPOKE);
       buffer.writeInt(player1.getEntityId());
       buffer.writeBoolean(pokemob);
       if (pokemob) {
         buffer.writeFloat(info.originalHeight);
         buffer.writeFloat(info.originalWidth);
         buffer.writeNBTTagCompoundToBuffer(player1.getEntityData().getCompoundTag("Pokemob"));
       }
       PokecubeMod.packetPipeline.sendTo(message, (EntityPlayerMP) player);
       MinecraftForge.EVENT_BUS.unregister(this);
     }
   }
 }
  public void doGet(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    String pathInfo = request.getPathInfo();
    String action = "Path info '" + pathInfo + "' not understood. Did nothing to";
    Proxy streamingServerProxy = EndToEndFramework.getInstance().getStreamingServerProxy();
    Proxy streamingServerProxyTwo = EndToEndFramework.getInstance().getStreamingServerProxyTwo();

    if (pathInfo.contains("startTwo")) {
      if (streamingServerProxyTwo.isStopped()) {
        streamingServerProxyTwo.start();
      }
      action = "Started";
    } else if (pathInfo.contains("stopTwo")) {
      if (!streamingServerProxyTwo.isStopped()) {
        streamingServerProxyTwo.stop();
      }
      action = "Stopped";
    } else if (pathInfo.contains("start")) {
      if (streamingServerProxy.isStopped()) {
        streamingServerProxy.start();
      }
      action = "Started";
    } else if (pathInfo.contains("stop")) {
      if (!streamingServerProxy.isStopped()) {
        streamingServerProxy.stop();
      }
      action = "Stopped";
    }

    outputResponse(request, response, action);
  }
Exemple #3
0
  /**
   * Query an AABB for overlapping proxies, returns the user data and the count, up to the supplied
   * maximum count.
   */
  public Object[] query(AABB aabb, int maxCount) {
    if (debugPrint) {
      System.out.println("Query(2 args)");
    }

    int lowerValues[] = new int[2];
    int upperValues[] = new int[2];
    computeBounds(lowerValues, upperValues, aabb);

    int indexes[] = new int[2]; // lowerIndex, upperIndex;

    query(indexes, lowerValues[0], upperValues[0], m_bounds[0], 2 * m_proxyCount, 0);
    query(indexes, lowerValues[1], upperValues[1], m_bounds[1], 2 * m_proxyCount, 1);

    assert m_queryResultCount < Settings.maxProxies;

    Object[] results = new Object[maxCount];

    int count = 0;
    for (int i = 0; i < m_queryResultCount && count < maxCount; ++i, ++count) {
      assert m_queryResults[i] < Settings.maxProxies;
      Proxy proxy = m_proxyPool[m_queryResults[i]];
      proxy.isValid();
      results[i] = proxy.userData;
    }

    Object[] copy = new Object[count];
    System.arraycopy(results, 0, copy, 0, count);

    // Prepare for next query.
    m_queryResultCount = 0;
    incrementTimeStamp();

    return copy; // results;
  }
Exemple #4
0
  @Ignore(
      value = {ANDROID, IPHONE, OPERA_MOBILE, PHANTOMJS, SAFARI},
      reason = "Android/Iphone/PhantomJS - not tested," + "Opera mobile/Safari - not implemented")
  @NeedsLocalEnvironment
  @Test
  public void canConfigureProxyThroughPACFile() {
    WebServer helloServer =
        createSimpleHttpServer("<!DOCTYPE html><title>Hello</title><h3>Hello, world!</h3>");
    WebServer pacFileServer =
        createPacfileServer(
            Joiner.on('\n')
                .join(
                    "function FindProxyForURL(url, host) {",
                    "  return 'PROXY " + getHostAndPort(helloServer) + "';",
                    "}"));

    Proxy proxy = new Proxy();
    proxy.setProxyAutoconfigUrl("http://" + getHostAndPort(pacFileServer) + "/proxy.pac");

    DesiredCapabilities caps = new DesiredCapabilities();
    caps.setCapability(PROXY, proxy);

    WebDriver driver = new WebDriverBuilder().setDesiredCapabilities(caps).get();
    registerDriverTeardown(driver);

    driver.get(pages.mouseOverPage);
    assertEquals(
        "Should follow proxy to another server",
        "Hello, world!",
        driver.findElement(By.tagName("h3")).getText());
  }
Exemple #5
0
 public static synchronized void setGlobalProxy(String host, int port) {
   if (globalproxy == null) {
     globalproxy = new Proxy();
     globalproxy.host = host;
     globalproxy.port = port;
   }
 }
Exemple #6
0
  // For backward compatibility, provide
  // programmatic access for setting proxy info
  // Extract proxy info from command line -D parameters
  // extended 5/7/2012 to get NTLM domain
  // H/T: [email protected]
  static void getGlobalProxyD() {
    Proxy proxy = new Proxy();
    String host = System.getProperty("http.proxyHost");
    String port = System.getProperty("http.proxyPort");
    int portno = -1;

    if (host != null) {
      host = host.trim();
      if (host.length() == 0) host = null;
    }
    if (port != null) {
      port = port.trim();
      if (port.length() > 0) {
        try {
          portno = Integer.parseInt(port);
        } catch (NumberFormatException nfe) {
          portno = -1;
        }
      }
    }

    if (host != null) {
      proxy.host = host;
      proxy.port = portno;
      globalproxy = proxy;
    }
  }
 /**
  * Usual main, command line arguments are ignored. Create remote calculator proxy, request an
  * addition, and print the result.
  *
  * @param ignore Ditto.
  */
 public static void main(String[] ignore) {
   System.setProperty(
       "java.security.policy",
       "file:///localhome/konstantin/githubRepos/designPatterns/proxy/homework/grant.policy");
   Proxy proxy = new Proxy();
   float result = proxy.add(2.2f, 6.6f);
   System.out.println("Client: Calculator result: " + result);
 }
Exemple #8
0
  @Ignore
  @Test
  public void testProcessIncomingDataPacket_serverPrint() {
    final String hexString = "14000080090000801202566f6a74206a6f696e6564207468652067616d652e0a00";

    proxy.setUser(createUser());
    proxy.processIncomingDataPacket(hexStringToByteArray(hexString));
  }
Exemple #9
0
  @Ignore
  @Test
  public void testProcessIncomingDataPacket_clientConnect() {
    proxy.setUser(createUser());
    setPrivateFieldValue(proxy, "sentConnect", true);

    final String hexString = "ffffffff636c69656e745f636f6e6e656374";
    proxy.processIncomingDataPacket(hexStringToByteArray(hexString));
  }
Exemple #10
0
  @Ignore
  @Test
  public void testProcessIncomingDataPacket_challange() {
    proxy.setUser(createUser());
    setPrivateFieldValue(proxy, "sentChallenge", true);

    final String hexString = "ffffffff6368616c6c656e67652031303134313238363136";
    proxy.processIncomingDataPacket(hexStringToByteArray(hexString));
  }
  /**
   * Tests getting the name using Proxy class accessor method. Setting can only be done in
   * constructor.
   */
  @Test
  public void testNameAccessor() {

    // Create a new Proxy and use accessors to set the proxy name
    Proxy proxy = new Proxy("TestProxy");

    // test assertions
    Assert.assertEquals(
        "Expecting proxy.getProxyName() == 'TestProxy'", proxy.getProxyName(), "TestProxy");
  }
Exemple #12
0
 @Test
 public void testIsAlive() {
   try {
     boolean b = proxy.isAlive();
     assertTrue(b);
     double d = proxy.getDelay();
     assertTrue(d > 0);
   } catch (IOException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
   }
 }
Exemple #13
0
  /**
   * Same as {@link #openConnection()}, except that the connection will be made through the
   * specified proxy; Protocol handlers that do not support proxing will ignore the proxy parameter
   * and make a normal connection.
   *
   * <p>Invoking this method preempts the system's default ProxySelector settings.
   *
   * @param proxy the Proxy through which this connection will be made. If direct connection is
   *     desired, Proxy.NO_PROXY should be specified.
   * @return a <code>URLConnection</code> to the URL.
   * @exception IOException if an I/O exception occurs.
   * @exception SecurityException if a security manager is present and the caller doesn't have
   *     permission to connect to the proxy.
   * @exception IllegalArgumentException will be thrown if proxy is null, or proxy has the wrong
   *     type
   * @exception UnsupportedOperationException if the subclass that implements the protocol handler
   *     doesn't support this method.
   * @see java.net.URL#URL(java.lang.String, java.lang.String, int, java.lang.String)
   * @see java.net.URLConnection
   * @see java.net.URLStreamHandler#openConnection(java.net.URL, java.net.Proxy)
   * @since 1.5
   */
  public URLConnection openConnection(Proxy proxy) throws java.io.IOException {
    if (proxy == null) {
      throw new IllegalArgumentException("proxy can not be null");
    }

    SecurityManager sm = System.getSecurityManager();
    if (proxy.type() != Proxy.Type.DIRECT && sm != null) {
      InetSocketAddress epoint = (InetSocketAddress) proxy.address();
      if (epoint.isUnresolved()) sm.checkConnect(epoint.getHostName(), epoint.getPort());
      else sm.checkConnect(epoint.getAddress().getHostAddress(), epoint.getPort());
    }
    return handler.openConnection(this, proxy);
  }
  /** Tests setting and getting the data using Proxy class accessor methods. */
  @Test
  public void testDataAccessors() {

    // Create a new Proxy and use accessors to set the data
    Proxy proxy = new Proxy("colors");
    proxy.setData(new String[] {"red", "green", "blue"});
    String[] data = (String[]) proxy.getData();

    // test assertions
    Assert.assertEquals("Expecting data.length == 3", data.length, 3);
    Assert.assertEquals("Expecting data[0] == 'red'", data[0], "red");
    Assert.assertEquals("Expecting data[1] == 'green'", data[1], "green");
    Assert.assertEquals("Expecting data[2] == 'blue'", data[2], "blue");
  }
  @EventHandler
  public void preinit(FMLPreInitializationEvent event) {
    LogHelper.info("Let's Move!");
    FLNetwork.init();

    Configuration config = new Configuration(event.getSuggestedConfigurationFile());
    config.load();
    TilePusher.maxTiles =
        config.get(Configuration.CATEGORY_GENERAL, "maximumBlocksPushed", 1024).getInt(1024);
    TilePusher.powerPerTile =
        config.get(Configuration.CATEGORY_GENERAL, "energyPerBlock", 250).getInt(250);
    Recipes.shouldAddRecipes =
        config.get(Configuration.CATEGORY_GENERAL, "addRecipes", true).getBoolean(true);
    Recipes.shouldAddFrameCopyResetRecipes =
        config
            .get(Configuration.CATEGORY_GENERAL, "addFrameCopyResetRecipes", true)
            .getBoolean(true);
    redrawChunksInstantly = config.get("client", "redrawChunksInstantly", true).getBoolean(true);
    if (config.hasChanged()) config.save();

    EntityMovingEventHandler.init();
    MoverEventHandler.init();

    for (int i = 0; i < 4; i++) {
      BlockStickyFrame.curLoadingIndex = i;
      GameRegistry.register(frame[i] = new BlockStickyFrame());
      GameRegistry.register(
          new ItemBlockFrame(frame[i]).setRegistryName(frame[i].getRegistryName()));
    }
    GameRegistry.register(moving = new BlockMoving());
    pusher = new BlockPusher();
    pusher.setUnlocalizedName("funkylocomotion:pusher");
    pusher.setRegistryName("funkylocomotion:pusher");
    GameRegistry.register(pusher);
    GameRegistry.register(new ItemBlockPusher(pusher).setRegistryName(pusher.getRegistryName()));

    GameRegistry.register(slider = new BlockSlider());
    GameRegistry.register(new ItemBlock(slider).setRegistryName(slider.getRegistryName()));
    GameRegistry.register(teleporter = new BlockTeleport());
    GameRegistry.register(
        new ItemBlockTeleporter(teleporter).setRegistryName(teleporter.getRegistryName()));
    GameRegistry.register(booster = new BlockBooster());
    GameRegistry.register(new ItemBlock(booster).setRegistryName(booster.getRegistryName()));
    GameRegistry.register(frameProjector = new BlockFrameProjector());
    GameRegistry.register(
        new ItemBlock(frameProjector).setRegistryName(frameProjector.getRegistryName()));

    GameRegistry.register(wrench = WrenchFactory.makeMeAWrench());

    GameRegistry.registerTileEntity(TileMovingServer.class, "funkylocomotion:tileMover");
    GameRegistry.registerTileEntity(TilePusher.class, "funkylocomotion:tilePusher");
    GameRegistry.registerTileEntity(TileSlider.class, "funkylocomotion:tileSlider");
    GameRegistry.registerTileEntity(TileBooster.class, "funkylocomotion:tileBooster");
    GameRegistry.registerTileEntity(TileTeleport.class, "funkylocomotion:tileTeleporter");
    GameRegistry.registerTileEntity(TileFrameProjector.class, "funkylocomotion:tileFrameProjector");

    proxy.registerRendering();

    CompatHandler.initCompat(event.getAsmData());
  }
Exemple #16
0
 @Ignore
 @Test
 public void testProcessIncomingPacket_serverDownload() {
   final String hexString =
       "0a0000800a00000018fdff00687474703a2f2f646b2e746f61737465646e65742e6f72672f646b5f6874747000";
   proxy.processIncomingDataPacket(hexStringToByteArray(hexString));
 }
Exemple #17
0
 @Ignore
 @Test
 public void testProcessIncomingDataPacket_serverData() {
   final String hexString =
       "010000800100008014210000002a00000000000000626c61636b616e6477686974655f653300120253657474696e6720757020636f6e666967737472696e67732e2e2e0a0013636d6420636f6e666967737472696e677320343220300a00s420";
   proxy.processIncomingDataPacket(hexStringToByteArray(hexString));
 }
Exemple #18
0
 @Ignore
 @Test
 public void testProcessIncomingDataPacket_serverConfig() {
   final String hexString =
       "02000080020000002cd20798031d150000626c61636b616e6477686974655f65330015020065346d32001504e0051b1400151f003336373430343534001521006d6170732fe00421203d0e2e627370001522002a31001523002a20450224002a20530225002a20341f26002a35001527006d6f64656c732f65332f775f73696c766572636c61772e64046b6d001528e0021d01615fe001170029e0021707775f626f6c7465728019002ae002190061e00419002be002190077801a8018002ce003180065e00218002de00318075f73746176726f73801a002ee0021a0061601a8017002fe002172064e001180030e0031806655f6d6574656fa0980031e0031a035f62616c80160032e0021620aec0160033e002162061e000170034e0031720c504616c70726a801a0035e0031a045f7769737080170036e0021707615f77796e64727880190037e00219204ce001320038e00318055f6e6d61726580180039e002180061e00318003ae00218204a056e6e72656170c193003be0071c0270656ea17c003cc01a02676c6f20cc052f65325f6669203b022e73702248003de0061d0a775f6461696b6174616e61803e003ee006200061e00720003fc0200265342f214704676c6f636b80190040c0192013403a209805646b6c657665a1690041e0071f0073e0075b0042e0062109655f676962746f72736f801f0043e00b1f026c6567801d0044e00b1d02666f6fa1180045e00b1e00682376801e0046e00c1e016561a01e0047e00b1e0363686573a05d0048e00b1f016579a1cc0049e00b1d0261726d801d004ae00b1d036d697363801e004be0081e04776f6f6431801c004ce00c1c0032801c004de0081c04676c617373a03a004ee00d1da03b004fe0081d237b01616ca03b0050e00d1da03b0051e0081d00722225a03a0052e00c1ca0390053e00c1c0033801c0054e0061c05615f70777262801b0055e00b1ba1400056e0081b0261746ba0370057e00b1ba0370058e0081b02737064a0370059e00b1ba037005ae0081b016163c0a7005be00b1ba037005ce0081b0276746ca037005de00b1ba037005ec01b240d0661335f686c74688018012104201123860073460124030564792e776176265ae003172001a0160023e003160173682339006180180024e0031802616d62a0160025e00316602f006280180026e00818006380180027e00818006480180028e003182706003180160029e0061600328016002aa0164672016572e002d8002be0041820aba017002ce00417450f8017002de00417a0d901760013636d6420636f6e666967737472696e677320343220313037300a00";
   proxy.processIncomingDataPacket(hexStringToByteArray(hexString));
 }
Exemple #19
0
  public void setUp() {

    try {
      super.setUp();
      shootist = new Shootist(6050, 5070);
      SipProvider shootistProvider = shootist.createSipProvider();
      shootistProvider.addSipListener(shootist);
      boolean sendRinging = true;
      for (int i = 0; i < forkCount; i++) {

        Shootme shootme = new Shootme(5080 + i, sendRinging, 400 * forkCount - 200 * i);
        sendRinging = false;
        SipProvider shootmeProvider = shootme.createProvider();
        shootmeProvider.addSipListener(shootme);
        this.shootme.add(shootme);
      }

      this.proxy = new Proxy(5070, forkCount);
      SipProvider provider = proxy.createSipProvider();
      provider.addSipListener(proxy);
      logger.debug("setup completed");

    } catch (Exception ex) {
      fail("unexpected exception ");
    }
  }
Exemple #20
0
  private void incrementOverlapCount(int proxyId) {
    if (debugPrint) {
      System.out.println("IncrementOverlapCount()");
    }

    Proxy proxy = m_proxyPool[proxyId];
    if (proxy.timeStamp < m_timeStamp) {
      proxy.timeStamp = m_timeStamp;
      proxy.overlapCount = 1;
    } else {
      proxy.overlapCount = 2;
      assert m_queryResultCount < Settings.maxProxies;
      m_queryResults[m_queryResultCount] = proxyId;
      ++m_queryResultCount;
    }
  }
Exemple #21
0
 @Ignore
 @Test
 public void testProcessIncomingDataPacket_serverConfig2() {
   final String hexString =
       "03000080030000802ce6078e0318152e0465332f77655f626f6c7465726869742e77617600152fe00716046d6574616c801b0030e0071b0473746f6e65801b0031e0071b03776f6f64801a0032a01a097374617665726561647980170033e0031702617761a0160034e0031602666972a0600035e00416026c796180160036e0031604626f756e63a02f0037a0180462616c6c69201de002780038e0061ae0017b0039e00619407ea068043a046e756ca108003be00726026c7962c090003ce00b1b0062801b003de00b1b0063801b003ee0061b03636f636ba052003fa01a0477776973702090c0c70040e00317e001c40041e003160473686f6f74a0470042e0031805636f72646974c0dd0043e00a1aa0980044a01a046e68617272e103bf0045e00418e0017f0046a01720130970657261707065617232801a0047e0051a007420e6006ba01a0048a01a056368616e743580130049a01380610277696ea251044a04676c6f2128002f20590574687175616b2137801a004be0001a065f6578706c6f64c0c6004cc018204f01737720e100772119017368a0ff004de00d1da03b004ec01d21202084a015004fe00515a0800050c015204908646b5f636e745f3031801a0051e00a1aa0fd0052e0051ac0310053e00616a02d0054e0061601336180170055c01720fc066c656374726f6e2230006ba3110056e00d1d0068801d0057c01d05615f73706565a100801b0a58046d696b696b6f2f657823d8006123e080170059c017056c616e64696ee00219005ac019037377696da0cc005bc013006221fe017468a095005ce00615a0e2005dc0160463686f6b65a041005ee0041400338014005fc014607e0064404480180060e004186032a0470061c019036a756d70a0130062e00313a0840063e00313a06e0064e00313003480130065e00313a2bb0066c013411ba0630067e00313a0630068e00313a0630069e00313a063006ae00313a063006be003130368757274a067006ce00717a06b006dc0176125a02c006ee00414a029006fe00414a0960070e00414a0970071e00414a0980072e00414003680140073e00414003780140074c014037061696ea0910075e00313a0900076e00313a08f0077e00313a08e0078e00313a08d0079e00313a08c007ae00313a08b007bc013007560a18014047c04686972e208f9007d8015415fe204f7007e8017e202f5007f8011a2dd80130080e00413a0e100818014e203a70082e00212a0f3008380126072e002a50084e00216602e404101760013636d6420636f6e666967737472696e677320343220313135370a00";
   proxy.processIncomingDataPacket(hexStringToByteArray(hexString));
 }
  /** Tests setting the name and body using the Notification class Constructor. */
  @Test
  public void testConstructor() {

    // Create a new Proxy using the Constructor to set the name and data
    Proxy proxy = new Proxy("colors", new String[] {"red", "green", "blue"});
    String[] data = (String[]) proxy.getData();

    // test assertions
    Assert.assertNotNull("Expecting proxy not null", proxy);
    Assert.assertEquals(
        "Expecting proxy.getProxyName() == 'colors'", proxy.getProxyName(), "colors");
    Assert.assertEquals("Expecting data.length == 3", data.length, 3);
    Assert.assertEquals("Expecting data[0] == 'red'", data[0], "red");
    Assert.assertEquals("Expecting data[1] == 'green'", data[1], "green");
    Assert.assertEquals("Expecting data[2] == 'blue'", data[2], "blue");
  }
Exemple #23
0
 @Ignore
 @Test
 public void testProcessIncomingDataPacket_serverConfigWithCmdBaseLine() {
   final String hexString =
       "07000080070000802c300434021b157e05676c6f62616c2f6d5f73776f7264686974622e77617600157fe00919006380190080e00919006480190081e00919006580190082c019017765801a0677636c616e6b61801d0083e00d1da0890084e00d1da08d0085e00d1da0910086e00d1da0950087c01d066d5f61726d6f7220afa0910088e00919a08d0089e00919a089008ae00919a085008be00919a081008cc019c09f0373746162a083008de00b1ba085008ee00b1ba087008fe00b1ba08903900565324017076469736373686f6fc0ef0b9105646f6f72732f65332f72201403746f723180180092c04c01655f2014016368a0470093e00116066461726b77696ea018039405653120e60b64737068657265737465616da0b20095c06201312f400804316c6f6f7080190c200c6d0015210c6d6d6e6d6d6f6002016e6f400a016e714005030015220c20db086465666768696a6b6c201c14707172737475767778797a7978777675747372717020320e6c6b6a69686766656463626100152320512000006140002007a009a04aa006050015240c6d61e00101030015250ce01863040015260c6e809e006f20b3006f2001006e20a60027406f2060a05a200c600d6006006d20e10028a01fe001056028200b400ca00d40082000030015290c20066000007aa0000200152a204120a4202340044009201e2005200b0200152be10a25e000b2e10216015f0c20040d200e566f6a745c6d6f64656c732fa1cb106d5f6869726f2e646b6d5c736b696e732f400e045f626f645f420c036c5c3000120253657474696e6720757020626173656c696e65732e2e2e0a0013636d6420626173656c696e657320343220300a00";
   proxy.processIncomingDataPacket(hexStringToByteArray(hexString));
 }
Exemple #24
0
 @Ignore
 @Test
 public void testProcessIncomingDataPacket_serverSpawnBaseline() {
   final String hexString =
       "0b0000800b00008016838a84511133000002c03240cf4000c03240cf40000000803f0000803f0000803f0000803f16838a8451122e00000200e18012400000e1801240000000803f0000803f0000803f0000803f16838a8451132a0000028032c01240008032c01240000000803f0000803f0000803f0000803f16838a8451142300000200e100cf400000e100cf40000000803f0000803f0000803f0000803f16838a827915690080e6800f400180e6800f400102000000803f0000803f0000803f0707200707010000803f05200002000116838a8279166a00a0e500084001a0e50008400102000000803f0000803f0000803f151f20141e010000803f05200002000116838a8279176b00a0e5e0016002a0e5e001600202000000803f0000803f0000803f0f0f200b0f040000803f05200002000116838a8279186c00c0e400084006c0e40008400602000000803f0000803f0000803f11031f34032a0000803f25200041003b0116838a8279196d00a0e5200e4001a0e5200e400102000000803f0000803f0000803f1a28201a28020000803f05200002000116838280d5808080011a00ec0008800f00ec0008800f8401993e1c000000803f0000803f0000803f0000803f16809884d0091b020004000000040000803f0000803f0000803f0000803f00c02f44004058c400001041002080440000bec20080944316809884d0091c030004000000040000803f0000803f0000803f0000803f004060c4004070c4000010410080bfc30000803f0080944316809884d0091d040004000000040000803f0000803f0000803f0000803f0080c0c30020b8c4000010410020804400c057c40080944316809884d0091e050004000000040000803f0000803f0000803f0000803f004060c40080ff43000010410020c04400402c440010044516809884d0091f060004000000040000803f0000803f0000803f0000803f002086c40020cec40000104100c05fc400402c440010044516809884d00920070004000000040000803f0000803f0000803f0000803f0080c0c300005f430080a043002080440080b0430010044516809884d00921080004000000040000803f0000803f0000803f0000803f004050c40000f8410080a0430080cfc30080f0430010044516809884d00922090004000000040000803f0000803f0000803f0000803f004030c4004070c40080a04300c00fc40000803f0010044516878a8279236e0000f500ff400100809d4300f500ff400102000000803f0000803f0000803f3117181731aa0000803f05200002000116878a8279246f00c0f4c00a000300008743c0f4c00a000302000000803f0000803f0000803f08081408081a0000803f25200041001d011687da80d18080202661000120002200d4c00000001042002200d4c0000000803f0000803f0000803f3333333fc01687ca84d19080202762000180210002002200d4c00000001042002200d4c0000000803f0000803f0000803f0000803fff1687da80d1808020285f0001200022c00dc000000010420022c00dc0000000803f0000803f0000803f3333333fc01687ca84d190802029600001800900020022c00dc000000010420022c00dc0000000803f0000803f0000803f0000803fff16838a84512a2a000002002c00084000002c000840000000803f0000803f0000803f0000803f16838a84512b70000002002c00040001002c000400010000803f0000803f0000803f0000803f16838a84512c33000002002c00da4000002c00da40000000803f0000803f0000803f0000803f16838a84512d70000002002c00d60001002c00d600010000803f0000803f0000803f0000803f1687da80d18080202e6300012000f200d4c0000000104200f200d4c0000000803f0000803f0000803f3333333fc01687ca84d19080202f6400018011000200f200d4c0000000104200f200d4c0000000803f0000803f0000803f0000803fff13636d6420626173656c696e65732031383436382034380a00";
   proxy.processIncomingDataPacket(hexStringToByteArray(hexString));
 }
Exemple #25
0
 @Ignore
 @Test
 public void testProcessIncomingDataPacket_serverCenterPrint() {
   final String hexString =
       "140000800900008017537061776e2070726f74656374696f6e206578706972657320696e2031207365636f6e642e0a00080000";
   proxy.processIncomingDataPacket(hexStringToByteArray(hexString));
 }
Exemple #26
0
 public boolean connect() {
   ExpCoordinator.printer.print("NCCPConnection.connect", 3);
   if (host.length() == 0) {
     ExpCoordinator.printer.print("NCCPConnection.connect host is not set", 6);
     return false;
   }
   if (proxy == null && nonProxy == null) {
     ExpCoordinator.printer.print("NCCPConnection.connect proxy null");
     return false;
   }
   if (ExpCoordinator.isSPPMon()) return (connectSPPMon());
   if (state == ConnectionEvent.CONNECTION_CLOSED || state == ConnectionEvent.CONNECTION_FAILED) {
     state = ConnectionEvent.CONNECTION_PENDING;
     if (proxy != null) {
       proxy.openConnection(this);
     }
   }
   /*
   if (nonProxy != null && proxy == null)
   {
   	return (nonProxy.connect());
   }
   */
   return true;
 }
Exemple #27
0
 @Ignore
 @Test
 public void testProcessIncomingDataPacket_serverSpawnBaseline2() {
   final String hexString =
       "09000080090000802cab0079001216938280d5808080014c000008ff80f300000ce000081d73017f201400e803ff010016938a84514d13000002ff00ffff40f1000000e00008e00120014e3e20200100c0202303dc008005e00008e00120004f604107c0f0ff80cd00c004e00008e001200050604107800700400b008001e00008202001010012024c6f6164696e67206d61702e2e2e0a00137072656361636865203b20636d6420626567696e2034320a00";
   proxy.processIncomingDataPacket(hexStringToByteArray(hexString));
 }
Exemple #28
0
 @Ignore
 @Test
 public void testProcessIncomingDataPacket_serverConfigString() {
   final String hexString =
       "2900008020000080176d6f74643a0a0028001202566f6a74206a6f696e6564207468652067616d652e0a001202566f6a74206973207573696e67204461696b6174616e612076312e3320666f72207838362e20204275696c742044656320333020323031342061742030323a35323a34302e0a00030851010000022200152007566f6a745c6d6f64656c732f676c6f62616c2f6d5f6869726f2e646b6d5c736b696e732f6869726f5f626f645f312e77616c5c300017537061776e2070726f74656374696f6e206578706972657320696e2031207365636f6e642e0a0008001c70250000ffffffff0001021982484029c0d4c10a0000585a0009b614c0006400000002000000e803000001000000010000006400000001000000be030000be0300001a878a92fb180176000002400040004029c0d4c10a0000b4424029c0d4c10a02000000803f0000803f0000803f1010181010200000403fa5240001000d01ffff010000510100110012001300140015001600170019001a00230024002e002f003000310032003300340035003600378302380000000000000039003a003b003c838280808080800441000000000000000ae0f0301b0042004300440045004600470049004a004b004c004d0050005100520053005400550056005700580059005a005b005c005d005e005f0060006100620063006400650066006700680069006a006b006c006d006e006f0070007100720073007400750076007700780079007b007c007d007e007f00800081008200830084008500880089009783029b00000000000000ac00ad00b000b100b200b300b400b500b600b700b800b900ba00bb00bc00bd00be00bf00c000c100c200c300c400c500c600c700c800c900ca00cb00cc00cd00ce00cf00d000d100d200d300d400d500d600d700d800d900da00db00dc00dd00de00df00e000e100e200e300e400e500e600e700e800e900ea00eb00ec00ed00ee00ef00f000f100f200f300f400f500f600f700fa00fb00fc00fd00fe00ff8001000180010101800102018001030180010e0180010f01800110018001110180011201800113018001140180011b018001200180012101800122018001240180012501800126018001290180013001800142018001430180014401800145018001460180014701800148018001490180014a0180014b0180014c0180014d01839b9e514e012c000001842020004029c0d4c10a4029c0d4c10a0000803f0000803f0000803f0000803f25201d04001d0111270000839b9e514f011d000001842020004029c0d4c10a4029c0d4c10a0000803f0000803f0000803f0000803f2520310400310111270000839b9e5150011d000001842020004029c0d4c10a4029c0d4c10a0000803f0000803f0000803f0000803f2d205d0400325d0111270000839b9e5151011d000001842028004029c0d4c10a4029c0d4c10a0000803f0000803f0000803f0000803f2d206c02006c790111270000000024ffffff24ffffff1108010008001109c700b20800";
   proxy.processIncomingDataPacket(hexStringToByteArray(hexString));
 }
Exemple #29
0
 public void write(ONL.Writer wrtr) throws java.io.IOException {
   wrtr.writeString(host);
   wrtr.writeInt(port);
   short cid = 0;
   if (proxy != null) cid = proxy.getConnectionID(this);
   wrtr.writeShort(cid);
 }
Exemple #30
0
 @Ignore
 @Test
 public void testProcessIncomingDataPacket_precacheString() {
   final String hexString =
       "170000801700000016838b82793d016b00602ee0d36002602ee0d3600202000000803f0000803f0000803f0f0f200b0f040000803f05200002000116838b82793e016a00602e00da4001602e00da400102000000803f0000803f0000803f151f20141e010000803f05200002000116878b82793f016c00002840e1400600008743002840e1400602000000803f0000803f0000803f03341f03112a0000803f25200041003b0116878b827940016c000028c0d240060000b4420028c0d2400602000000803f0000803f0000803f03111f03342a0000803f25200041003b0116878b827941016c00402f00da400600003443402f00da400602000000803f0000803f0000803f34031f11032a0000803f25200041003b0116838b827942017100000900dd800e000900dd800e02000000803f0000803f0000803f19181019192d0000803f05200002000116839b885143017500002028080900dde010080900dde0100000803f0000803f0000803f0000803f16879b885144017500002028080900dde0100000b442080900dde0100000803f0000803f0000803f0000803f16838b827945017100000900d7800e000900d7800e02000000803f0000803f0000803f19181019192d0000803f05200002000116839b885146017500002028080900d7e010080900d7e0100000803f0000803f0000803f0000803f16879b885147017500002028080900d7e0100000b442080900d7e0100000803f0000803f0000803f0000803f16838b82794801710000090006800e00090006800e02000000803f0000803f0000803f19181019192d0000803f05200002000116839b88514901750000202808090006e01008090006e0100000803f0000803f0000803f0000803f16879b88514a01750000202808090006e0100000b44208090006e0100000803f0000803f0000803f0000803f16838b82794b0171000009000c800e0009000c800e02000000803f0000803f0000803f19181019192d0000803f05200002000116839b88514c0175000020280809000ce0100809000ce0100000803f0000803f0000803f0000803f16879b88514d0175000020280809000ce0100000b4420809000ce0100000803f0000803f0000803f0000803f137072656361636865203b20636d6420626567696e2031383436380a00";
   proxy.processIncomingDataPacket(hexStringToByteArray(hexString));
 }