Browser/Turing sort of thingy... Help?
Author |
Message |
Lazarus
|
Posted: Wed May 18, 2005 12:08 pm Post subject: Browser/Turing sort of thingy... Help? |
|
|
I really have no idea what I'm doing, but I know what I want to be done. Maybe someone can help me out. You may be aware of N2H2, otherwise known as BESS and NetNanny, if you don't know what this is, it's an internet filter....
It is installed on the IE browsers, and blocks certain URLs from being loaded. I was looking in the OOT help files and found this
code: | var url : string
put "Enter the URL to load: " ..
get url
var netStream : int
var line : string
netStream := Net.OpenURLConnection (url)
if netStream <= 0 then
put "Unable to connect to ", url
return
end if
loop
exit when eof (netStream)
get : netStream, line
put line
end loop
Net.CloseConnection (netStream)
|
It show the HTML document in the run window of Turing. I was hoping I could save the HTML to a file, then have turing open it in Internet Explorer, if it can be done, please let me know, with some advice.
Thanks alot.
Lazarus[/code] |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Mazer
|
Posted: Wed May 18, 2005 12:17 pm Post subject: (No subject) |
|
|
I don't know how the internet filters work, but I guess you could do that. Unless it actually reads the HTML of every page the browser loads and blocks what it thinks is inappropriate, the page will load, but pictures probably won't. Usually the path to a picture is given like img src="somedirectory/picture.jpg" which means if you save the HTML file to your desktop, the browser would look for picture.jpg in a folder called somedirectory which should be on your desktop. Otherwise, if the picture is given with a full path (like http://www.filteredwebpage.com/images/picture.jpg) it should load up. |
|
|
|
|
|
Lazarus
|
Posted: Wed May 18, 2005 12:25 pm Post subject: (No subject) |
|
|
You are right about the pictures not loading, I know that, it's just like saving the source code of a site to your PC without the full address, I don't really need the pictures though, I just need to know how to save the source code to a file and make IE open it.
It's the URL that's blocked but only for IE, not the HTML its self |
|
|
|
|
|
Lazarus
|
Posted: Wed May 18, 2005 12:36 pm Post subject: (No subject) |
|
|
Can someone tell me why this won't work please? I know I have no idea how to do it in turing. Sorry....
code: | var file : int
var url : string
put "Enter the URL to load: " ..
get url
var netStream : int
var line : string
netStream := Net.OpenURLConnection (url)
if netStream <= 0 then
put "Unable to connect to ", url
return
end if
loop
exit when eof (netStream)
get : netStream, line
put line
end loop
Net.CloseConnection (netStream)
open : file, "payroll", write
write : file,
|
|
|
|
|
|
|
atrain
|
Posted: Wed May 18, 2005 11:23 pm Post subject: (No subject) |
|
|
In this, it will get the page, and save it to output.html
now all you have to do is use Sys.Exec or something to run iexplore.exe with this file to present it.
code: |
var url : string
put "Enter the URL to load: " ..
get url
var netStream : int
var line : string
netStream := Net.OpenURLConnection (url)
if netStream <= 0 then
put "Unable to connect to ", url
return
end if
var file : int
open : file, "output.html", put
loop
exit when eof (netStream)
get : netStream, line
put : file, line
end loop
Net.CloseConnection (netStream)
close : file
|
|
|
|
|
|
|
atrain
|
Posted: Wed May 18, 2005 11:24 pm Post subject: (No subject) |
|
|
btw: i didnt program that part because im on linux....
anywayz have fun!
sry bout double post |
|
|
|
|
|
StarGateSG-1
|
Posted: Thu May 19, 2005 7:34 am Post subject: (No subject) |
|
|
Ok, Internet filters do read thorugh the web site and pick out key works that are on a watch list database, but at the same time they also have a list of web sites in a database that It will block. Turing can't to the former of the too, but it can, maybe do the ladder. I am not sure how but I guess it could be done. I really never would have though of this in tuirn becasue it just isn't powerful enough. C++ would be much better off, Java would be even better. |
|
|
|
|
|
Lazarus
|
Posted: Fri May 20, 2005 6:05 pm Post subject: (No subject) |
|
|
Well, my school doesn't block it that way, I know this for a fact because I used to make reg programs that would disable it, all you would have to do is turn off the proxy with it (that has nothing to do with filtering certain words), needless to say, the school blocked access to the registry editor... which sucks. But anyways....
The reason I know that it doesn't filter out certain words, well N2H2 anyways is because you can go to any number of offensive sites you want. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
the_short1
|
Posted: Tue May 24, 2005 10:49 am Post subject: (No subject) |
|
|
.. ok .. except for a LOT of schools run stuff like:
bluecoat (ADSB) (http://www.bluecoat.com/)
yea... they block the PACKETS IP addy ! so .. . if another program trys to send or recieve from gmail.com ip( 64.233.185.106).. it will BLOCK it..
..
and you could
"if not Sys.Exec (output.html) then"
"end if"
and it will open it in internet explorer or whateever is the default browser..
hence why restrictions with FIREFOX are same as IE! |
|
|
|
|
|
atrain
|
Posted: Wed May 25, 2005 12:09 am Post subject: (No subject) |
|
|
darn u beat me to it:
% The "ShowWebPage" program.
if not Sys.Exec ("http://www.holtsoft.com") then
% The call failed!
put "Sys.Exec failed with message: ", Error.LastMsg
else
put "Sys.Exec successful."
put "Browser should now come up with Holt Software's web page..."
end if
in the turing folder, look through Examples to see all kinds of cool stuff |
|
|
|
|
|
|
|