D2jsp forum watcher

07/13/2009 06:14 Lurker3#1
1) Copy/paste the URL of the forum you want to watch into the program
2) type the word you want it to scan for
3) set the checking interval (or leave it at every 5 second)

The forum watcher will then prune that pages list and only show you the entries that contain your "watch" string.

[Only registered and activated users can see links. Click Here To Register...]
I developed this for myself to watch the EuropeClassicLadder forum for the word "rush" when I did classic rushes and made a fortune as I was almost always first poster :)

Im dropping this here incase anyone else wants to use it.
(You could also use it to watch post titles for item names, "trist", etc)


In more detail for those that care:
This program downloads the webpage that you specify as a "file". It then parses this file into an array and cuts out everything apart from the legitimate posts. It then looks through each post title to see if it contains the keyword you typed and drops it from the array if it doesnt. It then rebuilds the array of only your matches back into a website and fixes all paths that were relative to point at d2jsp
(or something like this... I cant remember and cant be assed to check the source)

I offer no support for this program as it was never written with other people in mind (just knocked-up for myself).

If you cant follow the steps above or dont have the correct .net libs installed from M$... then ask someone else :)
07/14/2009 06:39 _FightZ_#2
dont need it , but nice idea ;)
07/14/2009 10:21 smurfjunky#3
have anyone els checked this?
dont want to load keylogger or something else
07/15/2009 02:16 Lurker3#4
Quote:
Originally Posted by smurfjunky View Post
have anyone els checked this?
dont want to load keylogger or something else
Dont be an idiot all your life please.

If someone made a program, you dont think they could write a trojan/keylogger that doesnt show on an antivirus too? Scanning programs people make on here for trojans/viruses that are already known to Antivirus companies doesnt mean shit... they wouldnt be known to Antivirus companies so wouldnt show up!

If you wanna be "uber-safe" though... code it yourself or drop this code into a VB.net 2005 form (google for Vb.net 2005 express) and hit "compile":
Code:
Imports System
Imports System.IO
Imports System.Net

Public Class frmMain
    Public myPage As String = ""

    Private Function GetPage(ByVal getURL As String) As String
        Dim myFailures As Integer = 0
        Dim client As WebClient = New WebClient()
        Dim data As Stream = client.OpenRead(getURL)
        Dim reader As StreamReader = New StreamReader(data)
        Dim str As String = ""
        GetPage = ""

        Do
            GetPage &= str
            str = reader.ReadLine()
            If str = "" Then
                myFailures += 1
                If myFailures > 5 Then
                    Exit Function
                End If
            End If
        Loop
    End Function

    Private Sub updatePage(ByVal gotPage As String)
        Dim tableCell As String
        Dim tablePointer As Long
        Dim myPage As String = "<HTML><HEAD><TITLE>Blah</TITLE><link rel='stylesheet' type='text/css' href='http://forums.d2jsp.org/css/main0.css'></HEAD><BODY><table class='ftb'><colgroup align='center'><col></col><col width='50%' align='left'></col><col width='18%' align='left'></col><col width='7%'></col><col width='7%'></col><col width='18%' align='left'></col></colgroup><tr><th></th><th nowrap>Topic Title</th><th>Author</th><th>Replies</th><th>Views</th><th nowrap>Last Reply</th></tr>"
        Dim changeDone As Boolean

        'Find any TRs that contain my text-match
        Do
            tablePointer = UCase(gotPage).IndexOf("</TR>")
            If tablePointer.Equals(-1) Then Exit Do
            tablePointer += 5
            tableCell = gotPage.Substring(0, tablePointer)
            gotPage = gotPage.Substring(tablePointer, gotPage.Length - tablePointer)

            'Strip all but the first "<TR"
            Do
                tablePointer = UCase(tableCell).IndexOf("<TR", 2)
                If Not tablePointer.Equals(-1) Then
                    tableCell = tableCell.Substring(tablePointer, tableCell.Length - tablePointer)
                Else
                    Exit Do
                End If
            Loop

            ' Check if TR contains what Im looking for
            tablePointer = UCase(tableCell).IndexOf(UCase(txtMatch.Text))
            If Not tablePointer.Equals(-1) Then
                'I've got a TR that contains my text-match!
                tablePointer = UCase(tableCell).IndexOf("AUTHOR")
                If tablePointer.Equals(-1) Then
                    '...and its NOT the table header!  :P
                    myPage &= tableCell
                    If chkBeep.Checked = True Then Beep()
                End If
            End If
        Loop

        myPage &= "</TABLE></BODY></HTML>"

        'Fix links, etc
        Do
            changeDone = False
            'Fix INDEX links
            tablePointer = UCase(myPage).IndexOf("<A HREF=" & Chr(34) & "I")
            If Not tablePointer.Equals(-1) Then
                tableCell = myPage.Substring(0, tablePointer)
                tableCell &= "<a target='_blank' href=" & Chr(34) & "http://forums.d2jsp.org/i"
                tableCell &= myPage.Substring(tablePointer + 10, myPage.Length - (tablePointer + 10))
                myPage = tableCell
                changeDone = True
            End If

            'Fix USER links
            tablePointer = UCase(myPage).IndexOf("<A HREF=" & Chr(34) & "U")
            If Not tablePointer.Equals(-1) Then
                tableCell = myPage.Substring(0, tablePointer)
                tableCell &= "<a target='_blank' href=" & Chr(34) & "http://forums.d2jsp.org/u"
                tableCell &= myPage.Substring(tablePointer + 10, myPage.Length - (tablePointer + 10))
                myPage = tableCell
                changeDone = True
            End If

            'Fix SHOWLASTCOMMENT links
            tablePointer = UCase(myPage).IndexOf("<A CLASS=" & Chr(34) & "DESC" & Chr(34) & " HREF=" & Chr(34) & "I")
            If Not tablePointer.Equals(-1) Then
                tableCell = myPage.Substring(0, tablePointer)
                tableCell &= "<a class='desc' target='_blank' href=" & Chr(34) & "http://forums.d2jsp.org/i"
                tableCell &= myPage.Substring(tablePointer + 23, myPage.Length - (tablePointer + 23))
                myPage = tableCell
                changeDone = True
            End If

            'Fix IMAGES links
            tablePointer = UCase(myPage).IndexOf("SRC=" & Chr(34) & "/")
            If Not tablePointer.Equals(-1) Then
                tableCell = myPage.Substring(0, tablePointer)
                tableCell &= "src=" & Chr(34) & "http://forums.d2jsp.org/"
                tableCell &= myPage.Substring(tablePointer + 6, myPage.Length - (tablePointer + 6))
                myPage = tableCell
                changeDone = True
            End If
        Loop While changeDone = True

        webOutput.DocumentText = myPage
        Application.DoEvents()
    End Sub

    Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If tmrRefresh.Enabled = False Then tmrRefresh.Enabled = True
    End Sub

    Private Sub tmrRefresh_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrRefresh.Tick
        Dim myTimer As Long
        tmrRefresh.Enabled = False
        If Val(txtSeconds.Text) * 1000 >= 5000 Then
            myPage = GetPage(txtUrl.Text)
            updatePage(myPage)
        End If
        myTimer = Val(txtSeconds.Text) * 1000
        If Val(txtSeconds.Text) * 1000 >= 5000 Then tmrRefresh.Interval = Val(txtSeconds.Text) * 1000
        tmrRefresh.Enabled = True
    End Sub
End Class
07/15/2009 08:23 biggi21#5
[Only registered and activated users can see links. Click Here To Register...]
ich hab das mal mit viruschief.com versucht und der hat nix gefunden....
03/10/2011 11:50 SekSypeesorie#6
Thanks! forumwanting to have fun here
03/10/2011 12:36 speCt0R#7
this thread was almost dead dude -.-
03/10/2011 13:21 Progamer6661#8
Quote:
Originally Posted by SekSypeesorie View Post
Thanks! forumwanting to have fun here
Und schon wieder 2Jahre alten Shit hoch geholt.....muss wohl irgendwo nen Nest sein......:rolleyes:

For:SekSypeesorie..LOOK AT THE DATE!!!!!!!
03/10/2011 13:28 Deutsche-Mafia#9
ist das jetzt clean?^^