 |
|
 |
That's weird that it works fine before 1/21/05 but not after?
I've noticed on occasion that the index.dat date/time stamps are sometimes reset to 1601-1-1. Not sure why the IE browser inserts that bogus date/time!?
As you know, Microsoft doesn't disclose much about the internal index.dat file format so it could be that my script is somehow mishandling the date/times. (I doubt it though
Good luck!
|
|
|
|
 |
|
 |
Another user corrected the bug and I've updated the script. Cool!
1626-04-01 13:53:44 - http://forums.dpreview.com/...
Underlined line of code fixes 1626 date bug , at least it helped on my PC (W2K SP4)
Function AsciiToHex(sData)
Dim i, aTmp()
ReDim aTmp(Len(sData) - 1)
For i = 1 To Len(sData)
aTmp(i - 1) = Hex(Asc(Mid(sData, i)))
if len(aTmp(i - 1))=1 then aTmp(i - 1)="0"+ aTmp(i - 1)
Next
ASCIItoHex = aTmp
End Function
And thank you for your script, it was very useful in my writing a little tool in C# to view IE history on remote machines.
|
|
|
|
 |
|
 |
Being a network administrator for a large college I have the dubious task of keeping everything safe and secure. One person's idea of a "clean" site is anothers blasphemy. With so many cultures sitting beside each other I have found that once presented with a print out of some unsavoury sites that the students stop going there. I also transfer the data to a server side HOSTS file and use a batch file to download it to the local workstations piping all the nasties to 127.0.0.1. From then on all the sites are auto blocked
Saves a ton of time, aggravation, and any cultural backlash
Thanks tons !
Grant
|
|
|
|
 |
|
 |
Pretty sneaky to copy the banned website hosts file back to the client. Here's a quick vbscript I just threw together to accomplish the same thing without having to run any batch files: ' ------------------------------------------- Option Explicit Dim WshShell : Set WshShell = WScript.CreateObject("WScript.Shell") Dim oFso : Set oFso = CreateObject("Scripting.FileSystemObject") Dim strUserList Dim strUserName Dim Admin Dim Admin_Password Dim hosts Dim windows Admin = "Administrator" Admin_Password = "PASSWORD!" strUserList = "users.txt" hosts = "hosts" windows = "\WINDOWS\system32\drivers\etc\" 'wshShell.Run "cmd /c net view" If oFso.FileExists(strUserList) then Dim oFile : Set oFile = oFSO.OpenTextFile(strUserList, 1) Do Until oFile.AtEndOfStream strUserName = oFile.ReadLine wshShell.Run "cmd /c net use \\"+strUserName+"\c$ "+Admin_Password+" /user:"+strUserName+"\"+Admin,0,True If Not oFSO.FolderExists("\\"+strUserName+"\c$"+windows) Then wscript.Echo "Unable to access \\"+strUserName+"\c$"+windows Else wscript.Echo "Copying "+hosts+" to "+strUserName oFSO.CopyFile hosts,"\\"+strUserName+"\c$"+windows If oFSO.FileExists("\\"+strUserName+"\c$"+windows+hosts) Then wscript.Echo "Success." Else wscript.Echo "Failure." End If End If Loop oFile.Close Else wscript.Echo "Could not open " & strUserList End if wscript.quit ' -------------------------------------------
|
|
|
|
 |
|
 |
Thanks for the script ) I have to do some playing around, get the script to access the network share and copy my updated file over. We use a combo of Win98 and XP machines so I have to do the following. No real need to use a user variable and text file because this is done at every logon regardless of the user.
IF %os%=="Windows_NT" then goto xp
attrib -r c:\windows\hosts
copy \\servername\share\hosts c:\windows /Y
attrib +r c:\windows\hosts
goto end
:XP
attrib -r c:\windows\system32\drivers\etc\hosts
copy \\servername\share\hosts c:\windows\system32\drivers\etc /Y
attrib +r c:\windows\system32\drivers\etc\hosts
goto end
:end
Exit
|
|
|
|
 |
|
 |
On the wrong hand
Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
 |
|
 |
>> On the wrong hand?
I assume you're saying that these scripts, in the wrong hands could be used for malicious purposes.
True! I guess some spyware could harvest the history data and target their popup ads accordingly etc.,...
Thanks!
|
|
|
|
 |
|
 |
Have you ever use the keyboard hook application? That is more dangerous than yours. Could you imagine what will happened if I that app into your PC?
Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
 |
|
 |
Yep - I've played with keyboard logging under masm32 and MFC etc.,... there are tons of articles on the www.
"The only secure system is one that is powered off, cast in a block of concrete and sealed in a lead-lined room with armed guards---and even then I have my doubts." - Eugene H. Spafford.
|
|
|
|
 |
|
 |
It's fast and workable, and I really want to call the function or write similar in C#, any ideas?
good job!
|
|
|
|
 |
|
 |
Hi - I'm not that familiar with C#, but here's a code snippet that might help:
Q. How do I run another application from within my application?
A. Here is an example to run my script:
System.Diagnostics.Process.Start( "IE.vbs" );
or
Process.Start( "IE.vbs" );
Good luck! (-_-)
|
|
|
|
 |
|
 |
I think System.Diagnostics.Process.Start( "IE.vbs" ); is similar to start ie.vbs in the command line, or 2x clicking the file...
And what that does is to open an IE window to run the script, also trigerring antispyware software, IE6sp2's pop-up blocker (?) and may also not be alowed by user's preference about running scripts.
If you want to do it stealhly ( i guess that's what you're thinking ) you'll have to translate it to c#.
_
still learning the basics
|
|
|
|
 |
|
 |
Every so often, you see a project that makes you say "I wish I had thought of that!". Nice going.
- Ken
|
|
|
|
 |
|
 |
WScript.Echo "Thanks."
|
|
|
|
 |
|
 |
1. The date is crazy in many cases (1626 is the only wrong year, but that occurs in hundreds). For example:
... 2004-12-05 09:52:05 - http://forums.dpreview.com/...
... 2004-12-05 09:52:12 - http://forums.dpreview.com/...
... 1626-04-01 13:53:44 - http://forums.dpreview.com/...
... 2004-12-05 09:54:20 - http://forums.dpreview.com/...
2. The window of IEspy is too small for the displayed content (I did not test any other script).
I guess it depends on the display setting (fonts and DPI), but prudent programming does not rely on particular settings.
3. The Cancel button (which did not fit into the visible segment of the window) is an ornament without function.
Notwithstanding, thanks for having written it.
|
|
|
|
 |
|
 |
I've seen that date bug before:
1626-04-01 13:53:44 - http://forums.dpreview.com/...
When time permits I'll try to track that down.
As far as the IEspy window (400x160), feel free to modify the script to paint a larger window. Simply change these values:
objIE.height = 160
objIE.width = 400
The 'Cancel' button was designed to abort the search process at anytime you like. This code is invoked when clicked to exit the script:
If IsQuit()=True Then
CloseIE
CleanupQuit
End If
Thanks for your comments!
|
|
|
|
 |
|
 |
As far as the IEspy window (400x160), feel free to modify the script to paint a larger window
This is ok, but one should not ship instructions how to modify the product, but make the modification - even if you give the product as courtesy. Not everyone understands VB.
It was not a problem for me, I can navigate on the window even if it is not shown completely,
but some people don't even realize, that something is there "lower" (there is no scroll bar), and if they see something, for example the top half of a text line, they can not scroll without the scrollbar.
The 'Cancel' button was designed to abort the search process at anytime you like
Yeah, somehow I came to this idea too. I posted that this is an ornament, because it DOES NOT stop the process.
Thanks anyway.
|
|
|
|
 |
|
 |
Hi, cyber_flash
cyber_flash wrote:
I've seen that date bug before:
1626-04-01 13:53:44 - http://forums.dpreview.com/...
Underlined line of code fixes 1626 date bug , at least it helped on my PC (W2K SP4)
Function AsciiToHex(sData)
Dim i, aTmp()
ReDim aTmp(Len(sData) - 1)
For i = 1 To Len(sData)
aTmp(i - 1) = Hex(Asc(Mid(sData, i)))
if len(aTmp(i - 1))=1 then aTmp(i - 1)="0"+ aTmp(i - 1)
Next
ASCIItoHex = aTmp
End Function
And thank you for your script, it was very useful in my writing a little tool in C# to view IE history on remote machines.
|
|
|
|
 |
|
 |
Thank You!
That seemed to have resolved the date bug!
When converting to hex, prefixing with a zero
for 1 byte characters is a great find.
All the best,
Vengy!
|
|
|
|
 |
|
 |
I know for you, Westerners, spying is a good thing. You like to listen in, eavesdrop, put hidden cameras and spy modules in software. You like to be aware of what color your neighbour's trunks are, what he thinks, what he eats and with whom he sleeps.
However, stop for a moment and think: would you like the same to happen to you? Can't you value other people's privacy or is stealing other's secrets honourable?!
Technology can be abused. And don't tell me crap about curiosity, necessity, etc.
You should be ashamed...
|
|
|
|
 |
|
 |
siberian wrote:
I know for you, Westerners
That is a bit of an over generalisation.
siberian wrote:
You like to be aware of what color your neighbour's trunks are
Not remotely interested. Sorry to disappoint you.
siberian wrote:
Can't you value other people's privacy or is stealing other's secrets honourable?!
I don't think anyone ever said it was honourable.
siberian wrote:
And don't tell me crap about curiosity, necessity, etc.
I wasn't going to.
Do you want to know more?
WDevs.com - Member's Software Directories, Blogs, FTP, Mail and Forums
|
|
|
|
 |
|
 |
My russian is a little rusty - click here. (wtf?)
Anyhow, Russia is infamous for generating spam/spyware/porn plus almost ALL malicious code is downloaded and installed from those websites without the user even being aware of it.
About my 'Spy' script - at least you have the choice to run it for good or bad purposes.
Choose wisely!
|
|
|
|
 |
|
 |
I am totally on your side, cyber_flash.
it is not about the morality
--------------------
|
|
|
|
 |
|
 |
It's nothing that a system admin wouldn't do anyway.
The sooner you accept the fact that there are no secrets on the network the happier you will be. If you want to keep it private write it down and swallow it.
|
|
|
|
 |
|
 |
sure, but you have to admit that even the author didn't post his article here, someone else still using his own malicious codes to do the bad thing. The author just told us something might happen, and it also is the useful information for us to prevent something happenning.
|
|
|
|
 |