Reputation: 1592
I'm creating a console application to read classic asp page files and find certain functions. A lot of the functions I can use regex to get what I want which I then use the the text retrieved to query a database. An example of what I can already do -
This is a classic asp function (GetContentDirect) and I want to get the parameters which is easy to do with the below code. I would need to get the text CONTENT Logout and query the database with those words.
xsl.addText "Logout", obj_Content.GetContentDirect("CONTENT Logout")
The problem however is that the parameters for the functions are also variables or text and variables. Like the below code -
obj_node.appendChild obj_xml.createCDATASection(obj_Content.getContentDirect("CONTENT " & str_Temp))
I would need to get the value of str_Temp which is assigned elsewhere on the page. Whats the best way to go about doing this?
Upvotes: 0
Views: 184
Reputation: 91587
If your "variables" are actually constants, the solution is rather straightforward. Just let your console application know about the constants.
But, if they are truly variables, it seems the easiest way to get the values for all code paths would be to actually execute the code.
Modify your functions to log each time it is called, including the value of each parameter. Then crawl your site and run your console app against the resulting logs.
Upvotes: 1