Quick Recaptcha Java implementation using Gson

This is a quick Recaptcha implementation for java. I use Google Gson for parsing the JSON response. This code is only to verify a response not to create the widget. This code is referenced from: https://github.com/GinnyGuo/recaptcha Although I am unsure what library the author was extending it seemed rather unnecessary to do so.

package org.silabsoft.recaptcha;
import com.google.gson.Gson;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
 * @author Silabsoft
public class Recaptcha {
    private final String privateKey;
    private final Gson gson;
    public Recaptcha(String privateKey, Gson gson) {
        this.privateKey = privateKey;
        this.gson = gson;
    public Recaptcha(String privateKey) {
        this(privateKey, new Gson());
    public RecaptchaResponse checkAnswer(String response, String remoteIp) throws UnsupportedEncodingException, MalformedURLException, IOException {
        String postParameters = null;
        postParameters = "secret=" + URLEncoder.encode(privateKey, "UTF-8") + "&response=" + URLEncoder.encode(response, "UTF-8");
        if (remoteIp != null) {
            postParameters += "&remoteip" + URLEncoder.encode(remoteIp, "UTF-8");
        String url = "https://www.google.com/recaptcha/api/siteverify?";
        String fullUrl = url + postParameters;
        Reader reader = new InputStreamReader(new URL(fullUrl).openStream());
        RecaptchaResponse jsonResponse = gson.fromJson(reader, RecaptchaResponse.class);
        return jsonResponse;
 * @author Silabsoft
public class RecaptchaResponse {
    private final boolean valid;
    private final String[] errorMessage;
    public RecaptchaResponse(boolean success, String[] errorMessage) {
       this.valid = success;
       this.errorMessage = errorMessage;
    public boolean isValid() {
        return valid;
    public String[] getErrorMessage() {
        return errorMessage;
Posted in Java, Programming

No need to use a hot wallet to monitor transactions

Running a cryptocurrency faucet takes coins to give out. I have been buying them directly for awhile now and have been toying with the idea of selling a product to receive the coins to hand out. I’ve decided that digital goods would be an excellent product due to being able to give a near instant delivery. Naturally I went around and looked at resources available when selling products for coins but didn’t really find anything that met my criteria.

I started with looking at merchant services. Some of these look great but at the end of the day they all require one thing. That you trust them with holding your funds for a period of time or you have to trust them with handling the transaction properly. It’s not to say that some of them are not well built but when you have the knowledge to write something yourself or to modify pre existing source code it wouldn’t make sense to use something like this.

The next step would be to search around for shopping cart plugins. OSCommerce has one and so do a few other big carts. Generally these plugins work by running a hot wallet and calling commands via rpc. This would be ok However I didn’t really want my sales to be stored in a hot wallet. I could make the code transfer the funds to an offline address after the order is completed but I was still not happy with the result I wanted the funds to go directly to an offline address.

I already knew I had a full daemon in use I just had to put it to work by using the blocknotify. I quickly wrote a service in java to monitor incoming blocks and to check for a pool of addresses that would be responsible for orders in this instance I assign an address to each digital key added to the database. This may be overkill as you can probably use a pool of addresses and just keep reusing addresses after they are already finished with an order. My method also bottlenecks me from allowing customers to purchase multiple products in one order. If you wanted to sell multiple items in one order an easy alternative would be to have a pool of available order addresses and to use one address for each order.

Best part about all of this is that you do not need to run a daemon to get the same results dogechain provides you api access to get the same details as I mentioned above https://dogechain.info/api/websocket

So in conclusion if you are using a hot wallet to take orders online stop! spend a little time to create an alternative and protect your funds.

Posted in Cryptocurrency, Programming Tagged with:

Cryptocoin Library

I was looking for something lightweight to validate cryptocoin addresses of multiple cryptocoin currencies. You can find plenty of resources for bitcoin specifically or Litecoin but nothing that was lightweight and allowed the checking of multiple coins at the same time. The Cryptocoin library current can validate addresses of Bitcoin,Darkcoin,Dogecoin and Reddcoin. It can easily be extended to validate other coins as well You would simply need to add the enumeration with the address identifier. Some of the resources in the source have been found from other sources without a license and they have been marked accordingly. Specifically the BASE58 class and a small method in the address class that provides byte to hex conversion. The library works best for validating groups of AddressTypes rather than attempting to identify them simply because if two Cryptocoins use the same identifier any address would always be considered the first type in the enumeration list.

This is a sample test of The identification process:

package test;
import org.silabsoft.cryptocoin.identifier.AddressIdentifier;
import org.silabsoft.cryptocoin.identifier.AddressIdentifierException;
import org.silabsoft.cryptocoin.model.Address;
 * Used to validate cryptocoin address strings and attempt to identify CoinType
 * @author Silabsoft
public class IdentificationTest {
     * @param args
    public static void main(String[] args) {
        String addressesToTest[] = new String[]{
            "1vF5XepSWqvjMUdkFGQdgE1oqLjhZWoq", //failed size
            "1vF5XepSWqvjMUdkFGQdgE1oqLjhZWoqF", // should be valid
            "DNy1UBfm3QJmgGoVJnaXPtdfKyvdpFwRkc", //dogecoin
            "RqdoFVWu4Keio22GQD9nBSAHMynTNhy39j", //reddcoin
            "Xe32GbzrVi2L4WvFLT6Bf6gtRp1mVgR8rW", //darkcoin
        AddressIdentifier identifier = new AddressIdentifier();
        for (String address : addressesToTest) {
            try {
                Address cca = identifier.identifierAddressFromEncodedString(address);
                System.out.println(cca.getEncodedAddress() + " Type: " + cca.getCryptoCoinTypeAddressType());
            } catch (AddressIdentifierException ex) {
                System.out.println("Address: " + address + " is Invalid: " + ex.getMessage());

And it outputs:

Address: 1vF5XepSWqvjMUdkFGQdgE1oqLjhZWoq is Invalid: Invalid Decode Length
Xe32GbzrVi2L4WvFLT6Bf6gtRp1mVgR8rW Type: DARKCOIN_PUBKEY

The project source can be found here: https://github.com/silabsoft/CryptoCoinLib

Posted in Java

Biohazard RSPS – Amulet of Glory Dupe

Todays target: http://www.biohazardps.com/index.php

I’m really disappointed in Marcbob the owner of Biohazard Rsps he seems to think that banning me would SOLVE the dupe problem. So here it is for everyone right on my main page easily accessible for the masses! Hope that motivates you to actually fix the problem instead of just using the ban hammer.

var transformer = new RuneTekFourTransformer(runeAgent.getAgent(),new org.silabsoft.runeagent.gui.SubOutstreamPanel(runeAgent.getAgent().getEngine()));
var byteStream = new DeFinalizerTransformer("ByteStream", "org.arios.jagex.IoBuffer", "org.silabsoft.runeagent.hook.RT5DummyVariableByteStream");
var subByteStream = new ClassModifier("subByteStream", "org.arios.jagex.SubBuffer", null);
subByteStream.addMethodWrapper(new MethodWrapper("p1isaac","putOpcode","(II)V",true,null,null));
subByteStream.addMethodWrapper(new MethodWrapper("p1","putByte","(BI)V",true,null,"org.arios.jagex.IoBuffer"));
subByteStream.addMethodWrapper(new MethodWrapper("sp1","putByteA","(BI)V",true,null,"org.arios.jagex.IoBuffer"));
subByteStream.addMethodWrapper(new MethodWrapper("np1","putByteS","(II)V",true,null,"org.arios.jagex.IoBuffer"));
subByteStream.addMethodWrapper(new MethodWrapper("p2","putShort","(IB)V",true,null,"org.arios.jagex.IoBuffer"));
subByteStream.addMethodWrapper(new MethodWrapper("ip2","putLEShort","(II)V",true,null,"org.arios.jagex.IoBuffer"));
subByteStream.addMethodWrapper(new MethodWrapper("isp2","putLEShortA","(II)V",true,null,"org.arios.jagex.IoBuffer"));
subByteStream.addMethodWrapper(new MethodWrapper("sp2","putShortA","(II)V",true,null,"org.arios.jagex.IoBuffer"));
subByteStream.addMethodWrapper(new MethodWrapper("p3","putTriByte","(II)V",true,null,"org.arios.jagex.IoBuffer"));
subByteStream.addMethodWrapper(new MethodWrapper("ip4","putLEInt","(BI)V",true,null,"org.arios.jagex.IoBuffer"));
subByteStream.addMethodWrapper(new MethodWrapper("p4","putInt","(II)V",true,null,"org.arios.jagex.IoBuffer"));
subByteStream.addMethodWrapper(new MethodWrapper("sp4","putIntA","(IB)V",true,null,"org.arios.jagex.IoBuffer"));
subByteStream.addMethodWrapper(new MethodWrapper("isp4","putIntB","(IB)V",true,null,"org.arios.jagex.IoBuffer"));
var clientModifier = new RT5StreamObjectHook("LoginMethod", "org.arios.jagex.Class42", "org.silabsoft.runeagent.hook.GenericGameClient","outBuffer","method492");

next watch my video and use the script:

Posted in Runescape Private Servers

Classic-live abuse

It’s been awhile since I’ve had time to sit down and post on here. Life somehow gets busier are you get older. I have not been playing any oldschool Runescape recently but I did do something of interest the past two days. I dusted off RuneAgent and took it on a spin on some of the various servers found on moparscape. To celebrate the occasion I even created a youtube channel to post some of the fun.

Todays fun was on the server Classic-Live found at: http://classic-live.net/index.php?action=forum

Below is the config for RuneAgent:

var transformer = new RuneTekFourTransformer(runeAgent.getAgent());
var byteStream = new ClassModifier("ByteStream", "HZ", "org.silabsoft.runeagent.hook.GenericByteStream");
byteStream.addMethodWrapper(new MethodWrapper("p1isaac","I","(I)V",true));
byteStream.addMethodWrapper(new MethodWrapper("p4","F","(I)V",true));
byteStream.addMethodWrapper(new MethodWrapper("p1","Z","(I)V",true));
byteStream.addMethodWrapper(new MethodWrapper("p2","C","(I)V",true));
byteStream.addMethodWrapper(new MethodWrapper("p3","D","(I)V",true));
byteStream.addMethodWrapper(new MethodWrapper("ip4","J","(I)V",true));
byteStream.addMethodWrapper(new MethodWrapper("p8","I","(J)V",true));
byteStream.addMethodWrapper(new MethodWrapper("pjstr","I","(Ljava/lang/String;)V",true));
byteStream.addMethodWrapper(new MethodWrapper("np1","E","(I)V",true));
byteStream.addMethodWrapper(new MethodWrapper("sp1","G","(I)V",true));
byteStream.addMethodWrapper(new MethodWrapper("ip2","H","(I)V",true));
byteStream.addMethodWrapper(new MethodWrapper("sp2","K","(I)V",true));
byteStream.addMethodWrapper(new MethodWrapper("isp2","L","(I)V",true));
var clientModifier = new RuneTekFourClientTransformer("GameClient", "client", "org.silabsoft.runeagent.hook.GenericGameClient","DI");

And here are some videos of the fun!

Posted in Runescape Private Servers

Session #7 Ultimate Ironman DragonSlayer

As I left Last session I started preparing to do the Dragon Slayer quest in Oldschool Runescape as an Ultimate ironman. I Easily the oracle map peice as I had gathered all the parts nessesary to enter the magic door.  Next I decided to do Melzars. I quickly entered the maze and made my way through it. After killing Melzar the mad I had to face a Lessor demon. Sadly I didn’t bring food with me and was forced to teleport out. I teleported to lumbridge so I could get the anti fire shield from the duke and proceeded to port salrim to get wormbrains map and for the trip to karamaja to fish some lobsters. I also went ahead and purchased some mind runes to kill wormbrain. Being that space is an issue I decided to drop my bronze pickaxe, and hammer as I can easily get replacements without walking for miles. PROTIP: If you are fishing on Karamaja for Lobsters and plan to cook them there its a good idea to bring some logs with you or else you will have to walk to the volcano to chop some wood. After finishing the melzars maze i quickly killed wormbrain and proceeded to buy the boat.

During the quest you have to repair the boat. I did the right thing by gathering the steel nails but forgot I would need a hammer to repair the boat. Previously I had dropped the hammer on Karamaja so I could hold an additional lobster. So one wasted teleport later I was able to get the boat sea worthy.  Now before I go fight the dragon I will need to get some more food and then it will be time for the battle with the dragon. Below Is a shot of m y inventory before the fight. I dropped most of my easily replaced tools. It is true I could of dropped more of them but I am too lazy to walk for the replacements and will try to slay the dragon with the slots I have open.sCQoo7e[1]

Sadly my plan of 11 lobsters was not enough. So I dropped all my tools except my axe and filled up with lobsters once again.  Here is my second attempt Inventory:


The second run was a success killing the dragon was relatively easy now that I had plenty of food I can buy and wear Rune platebody now all I need to do is actually spend time making some gold in the game

Posted in Games, Runescape

Session #6 TheSilabsoft Ultimate Ironman

With the continuation of slayer I decided to complete a basilisk task with magic. Proceeded to get 43 magic in the process so have decided its time to do dragon slayer. Dragon slayer requires 90 steel nails so to make the nails i ventured to the deep wilderness mine to easily make them. Using super heat ore I can just mine and smith right in the same area with little to no walking I will probably come back here in the future to make arrow heads. The risk is high but since i need to be in the wilderness to get planks i might as well live on the edge. If you plan to use this method i do recommend not using a bronze pickaxe as mining coal is extremely tedious with it. I have not upgraded my pickaxe due to economic struggles and the fact that I still need to do lost city which will require me to drop all weapons and armour

Posted in Games, Runescape

Session #5 TheSilabsoft Ultimate Ironman

My slayer tasks are starting to become rather challenging. After obtaining 40 slayer I was assigned the task of killing Basilisks. The Basilisks are not match for my current defense and Armour so I was pretty much shredded when I tried to fight them. I don’t want to drop the task because they have good drops and I could use the money so I have started the task of making Iron knives to fight them with range. I am using knives rather than a bow and arrow because I need to have the mirror shield equipped or risk getting my stats lowered by its attacks. Unfortunately I only have 10 available slots in my inventory so this makes the task of making the knives extremely slow. I am currently mining iron in Remington > Walking to Falador to smelt > walking to Doric’s anvil to craft and then repeating. I do hope I can find a faster route in the future but for now this method will have to do. I plan to make 600 I believe it will be enough for the task of 100 basilisks but if its not I will attempt to melee the remaining. Ultimate Ironman has continued to remain a challenge and has been very entertaining to me. There are a few things that are extremely annoying with the game type but if you are an experienced Runescape player and have been looking for a reason to play again this may be what you are looking for.



Posted in Games, Runescape

Ultimate Ironman troubles Recruitment Drive

As an Ultimate iron man in old school Runescape you know the troubles of trying to keep everything in your inventory but what do you do when a quest requires you to remove EVERYTHING. That is exactly what The recruitment drive quest requires of you. So how do you handle this? I am not sure of the best way but as of right now I am putting this quest on the back burner. I will probably consider completing it only if I die or after I get 99 slayer.

Do you have any ideas on the best way I should handle this quest? Please feel free to comment!

Posted in Games, Runescape

Session #4 TheSilabsoft OSRS Ultimate Ironman

Slayer slayer and more slayer, It’s pretty much what I have been doing this session. I did squeeze in a few quests and had to do a little fletching to make some cash to buy a mirror shield. I received my first decent drop in slayer being white mystic boots which should help me start to recover some of the money I spent on the mirror shield. Also the amount of nature runes I received killing cockatrice makes me realize how badly I need to get my magic up so that I can alch on the spot rather than carrying things to the various shops found throughout Runescape



Posted in Games, Runescape