WordRider Home
Welcome! Log In Create A New Profile

Advanced

Made a plugin...

Posted by ntoskrnl 
Made a plugin...
November 07, 2009 09:11AM
I decided to try making a plugin for RapidLibrary for FRD, and it isn't too hard after all, even though I've never done anything with Java before.

RapidLibrary [rapidlibrary.com] is a search engine for RapidShare links and it treats the user as a clicking monkey and it also has a captcha. Example link: [rapidlibrary.com]

Basically I just copy-pasted other plugins' code, modified it to my needs, and wrote a few lines myself.

I don't have JDK so I can't compile or test it. It propably won't work, has a few issues:

- What should I input to PlugUtils.checkFileSize()? Apparently it needs the filesize in bytes (?) and I'm inputting it in megabytes.
- The line where it inputs the captcha to the site... Seriously, I have no idea about it.
- Is the part where I redirect it to the RS page correct?
- RapidLibrary has no favicon, is that an issue?
- I didn't include TestApp.java or build.xml.

If some of you guys have time, could you please check it?
Attachments:
open | download - rapidlibrary.7z (2.2 KB)
Re: Made a plugin...
November 07, 2009 09:57AM
Well, I won't test it for you, but I will guide you to make all alone, ok?
The making plugin is easy, but I also need people, who are able to fix it if necessary (plugins are changed daily), otherwise it's everything only my work. I can make 20 plugins/day, but I am not able to maintain all of them (in total). I prefer quality not quantity.
I expect you are smart enough and you already know some programming languages. It can be painful for you - as for beginner, but you can nothing to loose, just to earn.
So, JDK is here:
[java.sun.com]
Free Java IDE - IntelliJ IDEA is here:
[www.jetbrains.com]
IntelliJ IDEA has many screencasts videos, where you can see how to create/setup a project:
[www.jetbrains.com]

Check my tutorials how to work with SVN:
[wordrider.net]
but you can also use the integrated Version Control in IntelliJ IDEA.

Now to your questions:

- What should I input to PlugUtils.checkFileSize()? Apparently it needs the filesize in bytes (?) and I'm inputting it in megabytes.
See Javadoc for Plugin API: [wordrider.net]
- The line where it inputs the captcha to the site... Seriously, I have no idea about it.
Search for similar plugins, where captcha is used. Like NetGull and others. At first view, the code looks ok.

- Is the part where I redirect it to the RS page correct?
Just replace this line:
this.httpFile.setPluginID("RapidShare.com");
to
this.httpFile.setPluginID("");

appropriate plugin is assigned automatically when it's queued.

- RapidLibrary has no favicon, is that an issue?
It's not big issue, but I prefer to create new one if the website has no one - users can easily see and recognize what service does belong to the link

- I didn't include TestApp.java or build.xml.
If you decide to develope it, you will need it.

-------------------------------------





Edited 6 time(s). Last edit at 11/07/2009 06:02PM by Vity.
Re: Made a plugin...
November 09, 2009 05:45PM
Thanks. I might make it at some point.
Re: Made a plugin...
November 13, 2009 04:46PM
OK, I have installed JDK and IntelliJ IDEA. Checked the tutorial videos on IntelliJ's site but none of them are quite what I need.

I'd like to know, propably step by step, how to set up the project properly. Also, it would propably help knowing which parts of the FreeRapid SVN I need to grab.
Re: Made a plugin...
November 15, 2009 05:48PM
This should help:
[wordrider.net]

-------------------------------------

Re: Made a plugin...
November 16, 2009 06:02PM
Thank you, it helped me a lot.

I have an issue with the plugin though, not sure where I could ask it so going to ask here:

Other plugins with captcha support use the "action" parameter from "form", but on this site it is empty.

Language: HTML
<tr><td style="padding-left:20px;padding-right:20px;" bgcolor="EEEEEE" colspan=2> <form action="" method=post> <table border=0> <tr valign="middle"> <td valign="middle"> <font color="#007800"><img src="download.png" border="0"><b>Please ENTER CODE to download this file: </b></font> <br> <center><font style="font-size:12px; color:#000000;">rapidshare.com</font></center> </td> <td valign="middle"> <img src="code2.php" style="border: 1px solid green"> </td> <td valign="middle"> <input type=text class="input1" name="c_code" size=2> <input type=submit name="act" value=" Download "> </td></tr></table> </form></td></tr>

I've been trying to solve it for a good while now but simply can't figure it out.

Is there some other way of doing it than using the value from "form action"? Is it something obvious I've overlooked?



Edited 2 time(s). Last edit at 11/16/2009 06:05PM by ntoskrnl.
Re: Made a plugin...
November 16, 2009 07:31PM
Empty action means actual context - it's what you see in URL bar in browser - usually file's url, the rest is handled by cookies.

try this:

final HttpMethod httpMethod = getMethodBuilder().setReferer(fileURL).setActionFromFormByIndex(1, true).setAction(fileURL).HttpMethod();

or this:

final HttpMethod httpMethod = getMethodBuilder().setReferer(fileURL).setActionFromFormWhereTagContains("Please ENTER CODE to download", true).setAction(fileURL).HttpMethod();

Use Ctrl+Q over when cursor is on the method setActionFrom method. JavaDoc contains examples.

-------------------------------------





Edited 1 time(s). Last edit at 11/16/2009 07:33PM by Vity.
Re: Made a plugin...
November 17, 2009 01:03PM
Tried both of your examples... still no joy. :(

setAction(fileURL) will just make the page reload and it won't accept the captcha.
Re: Made a plugin...
November 17, 2009 01:09PM
Maybe, try the same but with .toPostMethod() at the end.

-------------------------------------

Re: Made a plugin...
November 17, 2009 02:04PM
Nope... still the same issue.
Sorry, only registered users may post in this forum.

Click here to login