|
-
Apr 14th, 2009, 02:52 PM
#1
Thread Starter
New Member
[RESOLVED] Stupid Flash Bug.
I have a program that is designed for Flash Debugging that I have been working on. The code that is not working is as follows:
Code:
Private Sub Command13_Click()
Dim x As Long
Dim var9 As String
Open "found.txt" For Output As #12 'This is becuase, rarely, it will not touch the "found.txt" file at the end of this sub when there are no varibs found.
Print #12, "No Variables Found"
Close #12
Command13.Enabled = False ' Disable the button to prevent user rage when the program stops responding :P
Open "words.txt" For Input As #9
While Not EOF(9)
Line Input #9, str
List1.AddItem Trim(str)
Wend
Close #9 ' Adds all the words in "words.txt" into listbox1. This whole sub is essentially a dictionary attack on a flash movie
x = 0
While x < List1.ListCount
On Error Resume Next
var9 = Flash.GetVariable(List1.List(x)) 'Goes through all the variables in listbox1 and trys to get them from the flash movie.
If var9 = "" Then List2.AddItem List1.List(x) 'if there are any found, it puts them into listbox2
x = x + 1
Wend
Open "found.txt" For Output As #10
Dim i As Long
For i = 0 To List2.ListCount
Print #10, List2.List(i) 'prints all the variables in listbox2 into "found.txt"
Next i
Close #10
Form2.Visible = True 'all form2 does is load the found variables into a listbox
Exit Sub
End Sub
Instead of printing all of the found variables to "found.txt", it prints the first 2000 or so words of "words.txt" into it. I can not see what my error is, maybe the great internet can save me here.
As I say in the comments, the whole sub is essentially a dictionary attack on a flash movie. I can provide the project files if nessacary.
Thank you.
-
Apr 15th, 2009, 10:40 AM
#2
Thread Starter
New Member
Re: Stupid Flash Bug.
Okay, I got it fixed. If any of you were wondering, here is the finalized code:
Code:
Private Sub Command13_Click()
Dim x As Long
Dim var9 As String
Open "found.txt" For Output As #12 'This is becuase, rarely, it will not touch the "found.txt" file at the end of this sub when there are no varibs found.
Print #12, "No Variables Found"
Close #12
Command13.Enabled = False ' Disable the button to prevent user rage when the program stops responding :P
Open "words.txt" For Input As #9
While Not EOF(9)
Line Input #9, str
List1.AddItem Trim(str)
Wend
Close #9 ' Adds all the words in "words.txt" into listbox1. This whole sub is essentially a dictionary attack on a flash movie
x = 0
While x < List1.ListCount
On Error GoTo errorhandler
var9 = Flash.GetVariable(List1.List(x)) 'Goes through all the variables in listbox1 and trys to get them from the flash movie.
If var9 <> "" Then List2.AddItem List1.List(x) 'if there are any found, it puts them into listbox2
x = x + 1
Wend
Open "found.txt" For Output As #10
Dim i As Long
For i = 0 To List2.ListCount
Print #10, List2.List(i) 'prints all the variables in listbox2 into "found.txt"
Next i
Close #10
Form2.Visible = True 'all form2 does is load the found variables into a listbox
Command13.Enabled = False
Exit Sub
errorhandler:
var9 = ""
x = x + 1
Resume
End Sub
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|