Click here to Skip to main content
15,881,380 members
Please Sign up or sign in to vote.
3.50/5 (2 votes)
See more:
i'm sorry if my english so bad..
i have a thesis for my graduate. My journal is "embedding secret data in HTML web page file".
in this case i have a problem with my thesis.
i'll explain detail of my thesis.

i have cover object HTML. in HTML i have tags. example:
<html>

</html>
and i want to hide char "A" in ASCII is(01000001)
<html></html>
+(01000001)

so i have stego HTML.
<hTml></htmL>
if hide =0
lowcase
else hide=1
uppercase

please help me to solve my thesis..i want use C# in programming..i have problem in extract characters inside HTML tags.

i wish in here..someone can help me to solve my problem..explain how do i start this problem?

thx
Posted
Comments
BobJanova 11-Apr-11 10:46am    
I don't really understand the question, but if you just want to hide one character in the HTML tag, can't you just use a string search to find them and then rewrite the relevant characters in the document?

Bear in mind though that HTML readers might reformat tag names sometimes, for example if you use DOM methods or the user has a DOM debugger (Firebug?) running.
petrucino 11-Apr-11 10:56am    
in my journal explained that the search algorithm used is DFA.
in there i must extract all characters inside HTML tags..and then i must replace all characters.
and this isn't hide one character..but i'll hide string..so it's need so much of tags html..

1 solution

using mshtml along with the other usual Web items,

WebRequest request = WebRequest.Create(URL);
request.Credentials = CredentialCache.DefaultCredentials;
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
reader.Close();
dataStream.Close();
response.Close();

//reads the html into an html document to enable parsing 
IHTMLDocument2 doc = (IHTMLDocument2)new HTMLDocument();
doc.write(new object[] { responseFromServer });
doc.close();

//loops through each element in the document
foreach (IHTMLElement el in (IHTMLElementCollection)doc.all)
{
    string ThisTag = el.tagName;

//check your capitalization here, etc.


I think that will get you started.
 
Share this answer
 
Comments
GenJerDan 12-Apr-11 9:19am    
Oh...this was taken from http://forums.asp.net/p/1455331/3330368.aspx Don't want anyone to think I'm smarter than I am. :^) I used this to parse some web pages for modified display.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900