(Msg. 1) Posted: Wed Jul 23, 2008 7:56 am
Post subject: JS file content found on my PC Add to elertz Archived from groups: alt>comp>virus (more info?)
Hi - I'm still experimenting with this machine. I found a temp file which contains the information
listed below. Has anyone any idea what effect such a file will have on this PC? (XP Home, SP3 and
all updates).
Thank you in advance for any insight you may be able to provide.
Dave
/*
* ====================== dir.js ========================
* ====== Javascript include for director.hta ===========
* ======================================================
*/
// initialize global variables
var debug = new Boolean; // loaded from persist.
var hintsOpen = new Boolean; // loaded from persist.
var hintsWidth = 175;
var totalWidth = 0;
var currentDevice;
var windowHeight = 190; // set for current container app. HTA: 190, HTM/IE: 300
var minWindowWidth = 220; // w/o width of <select> and 'settings'
var widthAdjust = -27; /// set for current container app. HTA: 190, HTM/IE: -3
var updateInProgress = new Boolean;
//Added by Brent
var doubleClicked = false;
var currentButton;
function toggleDebug() {
// debug = !debug
// updateLayout()
}
function initializeDevices() {
// populate oDevice data structure from Devices.xml
oDevice = new Array;
var xml = new ActiveXObject("msxml");
//Get file path for devices.xml in User's App Data directory
//Start with 'file:///'
var devFilePath = new String("file:\/\/\/");
//Get the path for the file from call to COM code
devFilePath += window.external.GetAppDataPath();
//Replace all '\\' occurrences with '/'
devFilePath = devFilePath.replace(/\\/g,"\/");
//Replace spaces with '%20'
devFilePath = devFilePath.replace(/\s/g,"%20");
//Add the name of the file
devFilePath += "devices.xml"
xml.URL = devFilePath;
devicesXML = xml.root.children;
for ( var i=0; i<devicesXML.length; i++ ) { // could eliminate this intermediate data structure
oDevice[i] = new Object;
oDevice[i].devID = devicesXML.item(i).children.item(0).text;
oDevice[i].id = devicesXML.item(i).children.item(1).text;
oDevice[i].service = new Array;
services = devicesXML.item(i).children.item(2).children
for ( var j=0; j<services.length; j++ ) {
oDevice[i].service[j] = new Object;
oDevice[i].service[j].serviceID = services.item(j).children.item(0).text;
oDevice[i].service[j].action = services.item(j).children.item(1).text
oDevice[i].service[j].status = services.item(j).children.item(2).text
}
} else {
oAllButtons.style.visibility = "hidden"
}
// update Select
oSelect.options.length = 0;
for ( var i=0; i< devicesXML.length; i++ ) {
var oOption = document.createElement("OPTION");
oOption.text=oDevice[i].id;
oSelect.options.add(oOption);
}
// select the current device in the drop down combo box
oSelect.selectedIndex = currentDevice
// assign the access key to 'Select Device'
var selectText = tdcStrings.recordset("dir-label-select").value;
var selectAccKeyIndex = selectText.toLowerCase().indexOf("<u>");
if (selectAccKeyIndex >= 0)
{
oSelect.accessKey = selectText.substr(selectAccKeyIndex + 3, 1);
}
// assign the access key to 'Settings' menu item
var settingsText = tdcStrings.recordset("settings-title").value;
var settingsAccKeyIndex = settingsText.toLowerCase().indexOf("<u>");
if (settingsAccKeyIndex >= 0)
{
settingstitle.accessKey = settingsText.substr(settingsAccKeyIndex + 3, 1);
}
// assign the access key to 'Status' menu item
var statusText = tdcStrings.recordset("status-title").value;
var statusAccKeyIndex = statusText.toLowerCase().indexOf("<u>");
if (statusAccKeyIndex >= 0)
{
statustitle.accessKey = statusText.substr(statusAccKeyIndex + 3, 1);
}
// empty old buttons
oAllButtons.innerHTML="";
// add new button - hidden
for ( var j=0; j<oDevice[currentDevice].service.length; j++ ) {
button = oDevice[currentDevice].service[j].serviceID
var buttonText = tdcStrings.recordset("dir-btn-"+button).value;
var accKey = null;
var accKeyIndex = buttonText.toLowerCase().indexOf("<u>");
if (accKeyIndex >= 0)
{
accKey = buttonText.substr(accKeyIndex + 3, 1);
}
// hide the drop-down list box and menu if no devices are installed
if ((oDevice.length == 1) && (oDevice[0].devID == "unknown"))
{
oSelectLabel.style.visibility = "hidden";
oSelect.style.visibility = "hidden";
oMenuMask.style.visibility = "hidden";
}
updateMenus();
updateInProgress = false;
}
function showHint(buttonID) {
service = buttonID.substring(4);
oHintsTitleLabel.dataFld="dir-hint-" + service.toLowerCase() + "-title";
oHintsLabel.dataFld="dir-hint-" + service.toLowerCase();
}
function runApp(buttonID){
//alert("run: "+buttonID + " for device:" + currentDevice)
//var shell = new ActiveXObject("WScript.Shell");
//shell.run(app,1,false);
btnID = buttonID.substring(1, buttonID.length - 1);
for (var i = 0; i < oDevice[currentDevice].service.length; i++)
{
if (btnID== oDevice[currentDevice].service[i].serviceID)
{
window.external.RunApp(btnID,
oDevice[currentDevice].service[i].action,
oDevice[currentDevice].devID);
break;
}
}
}
// Present Settings menu based on currentDevice
function processMenu() {
var menuStr = "show-menu=dev"+currentDevice+"-settings";
ShM=1;
popi(menuStr, 'menu1', 0);
window.event.cancelBubble = true;
}
function processStatusBtn() {
window.external.RunApp("status", oDevice[currentDevice].statusmon,
oDevice[currentDevice].devID);
}
function updateMenus() {
var maxMenuWidth = 0;
var menuNum = 1;
while(eval("window.menu"+menuNum))
{
maxMenuWidth = 0;
var dirMenu=eval("menu"+menuNum);
var menuName = dirMenu[0];
var menuStructIdx = getMenuStructIndex(dirMenu[0]);
if (menuStructIdx >= 0)
{
for (var i = 0; i < menuStruct[menuStructIdx].entry.length; i++)
{
var entryName = menuStruct[menuStructIdx].entry[i].name;
var elem = eval("document.all('"+entryName+"')");
maxMenuWidth = Math.max(maxMenuWidth, elem.offsetWidth);
}
if (maxMenuWidth > 0)
{
var ancestorElem = eval("document.all('menu"+menuNum+"')");
// add extra pixels for the border and submenu image (arrow bitmap)
maxMenuWidth += (dirMenu[4] * 2) + 8;
//if (maxMenuWidth > document.all('menu1').offsetLeft)
// maxMenuWidth = document.all('menu1').offsetLeft;
ancestorElem.style.width = maxMenuWidth+"px";
for (var j = 0; j < ancestorElem.children.length; j++)
{
var childElem = ancestorElem.children[j];
if ((childElem.children.length > 0) &&
(childElem.children[0].style.width))
childElem.children[0].style.width = maxMenuWidth+"px";
}
}
}
All times are: Eastern Time (US & Canada) (change)
Page 1 of 1
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum