• Welcome to Valhalla Legends Archive.
 

HTML Bot - The PHP Bot Alternate

Started by Joe[x86], February 08, 2005, 07:45 PM

Previous topic - Next topic

Joe[x86]

<html>
       <head>
            <title>Webbot</title>
         <object classid="clsid:CB1619E4-0752-44A6-9828-CE58616BC8FE" id="CSB" width="168" height="16">
                  <param name="_ExtentX" value="4445">
                  <param name="_ExtentY" value="423">
           </object>
         <Script Language="VBScript">
              With CSB
                   .Accept = 579728
                    .CDKey = InputBox("Key?")
                    .Username = InputBox("Username?")
                    .Password = InputBox("Password?")
                    .Product = InputBox("Product (4-Byte Reversed)?")
                    .Server = InputBox("Server?")
                    .HomeChannel = InputBox("Home channel?")
                    .Connect
               End with
         </script>
       </head>
  </html>



InsaneJoey1337: the HTML CSB.
InsaneJoey1337: Tested, too. ^^
Warrior[x86]: ..WTF
Warrior[x86]: It worked?
InsaneJoey1337: Sure did.
Warrior[x86]: haha
Warrior[x86]: support Events
Warrior[x86]: =P
Warrior[x86]: and your God
InsaneJoey1337: lol
InsaneJoey1337: how?
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

MyndFyre

If you had Google'd "Events in VBScript," like I did, your first result would have been this page, which surprisingly enough, provides a GREAT overview about how the event-driven VBScript language works.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

dxoigmn

A "PHP Bot" would run local to the server.  This however runs local to the user.

tA-Kane

It is a different twist on how to run CSB though... But that's the problem, it's CSB.
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Joe[x86]

This was intended to be another one of those "omfg look joes being a dumbass again" threads. I know its CSB, but I had to use a OCX, and CSB was right there. I was just fucking arround in frontpage and found this..

I read the Events in VBScript page, and it looks extremely easy.

<script language="VBScript" for="CSB" event="UserTalks">
    AddChat vbGreen, "<" & Username & "> " & Message
</script>


The only problem.. how to AddChat it. I'm sure theres some sub to call to add it to the end of the page, right? Could any of you HTML wizzes teach me it real quick?
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

UserLoser.

Can't you just do?:


Response.Write "<html code, chat msg, etc.>"

dxoigmn

Quote from: UserLoser on February 08, 2005, 10:29 PM
Can't you just do?:


Response.Write "<html code, chat msg, etc.>"


No response object, have to use Document.write().  Response == ASP

OnlyMeat

As mentioned already you would need to use DHTML ( dynamic html ) as that allows you to create dynamic content locally.

This is an interesting idea, the only flaw i can see is that alot of people like to use firefox ( myself included ) which doesn't support activex controls for obvious security reasons, However possibly a java applet might be more effective as 99% of all browsers support them.

Joe[x86]

Hrm.. when I designed this in Frontpage it was in Internet Explorer, so I guess I forgot about that. Doesn't Firefox support ActiveX if you approve it to run? If not, I'm sure everyone has a copy of IE layin arround to screw arround with for a few minutes.

Another thing: When the window displaying the page is distroyed or sent to another page, the CSB is distroyed and disconnects, right?
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

tA-Kane

Quote from: JoeTheOdd on February 09, 2005, 07:01 AMI'm sure everyone has a copy of IE layin arround to screw arround with for a few minutes.
I do. I only use it for FTP though, since it has such a nice easy-to-use interface...
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

OnlyMeat

Quote from: JoeTheOdd on February 09, 2005, 07:01 AM
Hrm.. when I designed this in Frontpage it was in Internet Explorer, so I guess I forgot about that. Doesn't Firefox support ActiveX if you approve it to run? If not, I'm sure everyone has a copy of IE layin arround to screw arround with for a few minutes.

Firefox has no built in support for activex controls because they are a security risk which allows people to potentially run malicious software on your system, not to mention of the other security flaws in IE.

I know what you mean though, i think i might consider implementing a java applet simply because i love all things firefox :).

Quote from: JoeTheOdd on February 09, 2005, 07:01 AM
Another thing: When the window displaying the page is distroyed or sent to another page, the CSB is distroyed and disconnects, right?

I think it will be destroyed as soon as the frame/page is changed. As IE is just an ActiveX scripting host the object lifetime will be that of the page itself, the only way of getting around that is either to use a hidden frame on the site you have made or possibly create a frame thats always displayed in the browser that way they can navigate to different pages while still retaining the bot object frame.

Joe[x86]

#11
I wasn't worried about keeping it going, I was worried about being able to kill it when I wanted too. Multiple windows is not an issue for Mr. 3-Row autohide taskbar.

Now supports events. Not tested, but I'm on it!

The below code has the following bad habbits:
It loves to clear the screen!
I'm not sure if it even made it to the channel..

<html>
    <head>
        <title>HTML Webbot</title>
        <object classid="clsid:CB1619E4-0752-44A6-9828-CE58616BC8FE" id="CSB" width="168" height="16"></object>
        <script Language="VBScript">
            Public Accept
            Public CDKey
            Public Username
            Public Password
            Public Product
            Public Server
            Public Home
            Public Screen

            Connect

            Public Sub GetConf()
                Accept = 579728
                Username = InputBox("Username?")
                Password = InputBox("Password?")
                Product = InputBox("Product (4-Byte Reversed)?")
                Server = InputBox("Server?")
                CDKey = InputBox("Key?")
                Home = InputBox("Home channel?")
            End Sub
           
            Public Sub SetConf()
                With CSB
                    .Accept = 579728
                    .Username = Username
                    .Password = Password
                    .Product = Product
                    .Server = Server
                    .CDKey = CDKey
                    .HomeChannel = Home
                End With
            End Sub

            Public Sub Connect()
                Screen = "HTML Webbot by InsaneJoey[e2] loaded."
                Screen = Screen & Chr(13) & "Thanks to Cuphead[vL] for CSB."
                Call Document.Write(Screen)
                GetConf
                SetConf
                CSB.Connect
            End Sub

        </script>
       
        <script language="VBScript" for="CSB" event="BnetConnected">
            Screen = Screen & Chr(13) & "[BNCS] Connected!"
            Call Document.Write(Screen)
        </script>
       
        <script language="VBScript" for="CSB" event="BnetConnecting">
            Screen = Screen & Chr(13) & "[BNCS] Connecting.."
            Call Document.Write(Screen)
        </script>
       
        <script language="VBScript" for="CSB" event="BnetDisconnected">
            Screen = Screen & Chr(13) & "[BNCS] Disconnected!"
            Call Document.Write(Screen)
        </script>

        <script language="VBScript" for="CSB" event="BnetError">
            Screen = Screen & Chr(13) & "[BNCS] Error " & ErrorNumber & ": " & Description & "."
            Call Document.Write(Screen)
        </script>
       
        <script language="VBScript" for="CSB" event="BNLSAuthEvent">
            Screen = Screen & Chr(13) & IIf(Success, "[BNLS] Authorized!", "[BNLS] Auth failed!")
            Call Document.Write(Screen)
        </script>
       
        <script language="VBScript" for="CSB" event="BNLSConnected">
            Screen = Screen & Chr(13) & "[BNLS] Connected!"
            Call Document.Write(Screen)
        </script>
       
        <script language="VBScript" for="CSB" event="BNLSConnecting">
            Screen = Screen & Chr(13) & "[BNLS] Connecting.."
            Call Document.Write(Screen)
        </script>

        <script language="VBScript" for="CSB" event="BNLSDataError">
            Select Case Message
                Case Else
                    Screen = Screen & Chr(13) & "[BNLS] Data Error: Unhandled Byte -- " & Message & "."
            End Select
            Call Document.Write(Screen)
        </script>
       
        <script language="VBScript" for="CSB" event="BNLSError">
            Screen = Screen & Chr(13) & "[BNLS] Error " & ErrorNumber & ": " & Description & "."
            Call Document.Write(Screen)
        </script>
       
        <script language="VBScript" for="CSB" event="JoinedChannel">
            Screen = Screen & Chr(13) & "[BNCS] Joined Channel " & ChanelName & "."
            Call Document.Write(Screen)
        </script>
       
        <script language="VBScript" for="CSB" event="LoggedOnAs">
            Screen = Screen & Chr(13) & "[BNCS] Logged on as " & Username & " using " & Product & "."
            Call Document.Write(Screen)
        </script>

        <script language="VBScript" for="CSB" event="LogonEvent">
            Select Case Message
                Case Else
                    Screen = Screen & Chr(13) & "[BNCS] Logon Event: Unhandled Byte -- " & Message & "."
            End Select
            Call Document.Write(Screen)
        </script>
       
        <script language="VBScript" for="CSB" event="News">
            Screen = Screen & Chr(13) & "[BNCS] News: " & News
            Call Document.Write(Screen)
        </script>
       
        <script language="VBScript" for="CSB" event="ServerError">
            Screen = Screen & Chr(13) & "[BNCS] Error: " & Message
            Call Document.Write(Screen)
        </script>
       
        <script language="VBScript" for="CSB" event="ServerInfo">
            Screen = Screen & Chr(13) & "[BNCS] Info: " & Message
            Call Document.Write(Screen)
        </script>
       
        <script language="VBScript" for="CSB" event="UserEmote">
            Screen = Screen & Chr(13) & Username & " (Emote): " & Message
            Call Document.Write(Screen)
        </script>
       
        <script language="VBScript" for="CSB" event="UserInChannel">
            Screen = Screen & Chr(13) & Username & " is in the channel using " & Product & " with a ping of " & Ping & "."
            Call Document.Write(Screen)
        </script>
       
        <script language="VBScript" for="CSB" event="UserJoins">
            Screen = Screen & Chr(13) & Username & " has joined the channel using " & Product & "."
            Call Document.Write(Screen)
        </script>
       
        <script language="VBScript" for="CSB" event="UserLeaves">
            Screen = Screen & Chr(13) & Username & " has left the channel."
            Call Document.Write(Screen)
        </script>

        <script language="VBScript" for="CSB" event="UserTalk">
            Screen = Screen & Chr(13) & Username & ": " & Message
            Call Document.Write(Screen)
        </script>
       
        <script language="VBScript" for="CSB" event="VersionCheck">
            Select Case Message
                Case Else
                    Screen = Screen & Chr(13) & "[BNLS] Version Check: Unhandled Byte -- " & Message & ". ExtraInfo: " & ExtraInfo
            End Select
            Call Document.Write(Screen)
        </script>
       
        <script language="VBScript" for="CSB" event="WhisperFromUser">
            Screen = Screen & Chr(13) & Username & " (Whisper): " & Message
            Call Document.Write(Screen)
        </script>
       
        <script language="VBScript" for="CSB" event="WhisperToUser">
            Screen = Screen & Chr(13) & "You whisper to " & Username & ": " & Message
            Call Document.Write(Screen)
        </script>

    </head>
</html>
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

CrAz3D

Upload that somewhere!...I wanna try it  <3!
rebundance - having or being in excess of sheer stupidity
(ré-bun-dance)
Quote from: Spht on June 22, 2004, 07:32 PMSlap.
Quote from: Adron on January 28, 2005, 09:17 AMIn a way, I believe that religion is inherently evil, which includes Christianity. I'd also say Christianity is eviller than Buddhism (has more potential for evil).
Quote from: iago on April 19, 2005, 01:06 PM
CrAz3D's ... is too big vertically, at least, too big with ... iago ...

Joe[x86]

It didn't make it to the channel. Or atleast, it wasn't still there when I got there to look. If you can fix the Document.Write clearing bug, it'd be apreciated. Its HTML, btw. You can just run it yourself, can't you?
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

OnlyMeat

Quote from: JoeTheOdd on February 09, 2005, 05:07 PM
It didn't make it to the channel. Or atleast, it wasn't still there when I got there to look. If you can fix the Document.Write clearing bug, it'd be apreciated. Its HTML, btw. You can just run it yourself, can't you?

The reason you are having problems is because you shouldn't actually call document.write after the page has loaded.

The best way to display information on the page when events occur is to create a div tag or another container tag that supports replacing the html content inside of it.

I believe their are 2 attributes of this object called innerHTML and innerText  the former allows you to write formatted html content dynamically inside of the container after the page is loaded and the latter allows you to write plain text inside of the container.