StealthBot.net: from symbolic links for hashes - StealthBot.net

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

from symbolic links for hashes

#1 User is offline   joe x86 Icon

  • Emergency Programmer Hologram
  • PipPipPip
  • Group: Moderators
  • Posts: 315
  • Joined: September-06 09

Posted February 10, 2010 - 09:26 AM

I believe this is doable in StealthBot 2.7, through a config hack. This will definitely be included in SB3. I always configured my bot to point to my Program Files folders, and I configured JavaOp to point to my Wine directory.
Are we still listing our languages and computer specs in our signature in November 2018?

Swift, Ruby on Rails, Objective-C, JavaScript (the good parts)

iPhone Xs Max. Mid 2015 MacBook Pro (16GB RAM, 256GB SSD, work laptop). Mid 2011 Mac mini (16GB RAM, 500GB HDD, home desktop). Lenovo TS140 (Ubuntu on 3TB mirrored ZFS root, 20GB ECC RAM, NAS).

#2 User is offline   oblivious Icon

  • Full Member
  • PipPipPip
  • Group: Senior Members
  • Posts: 315
  • Joined: October-25 09

Posted February 10, 2010 - 09:47 AM

It's doable with scripts in 2.7, in fact, I'll write a quick one and post it here.

(for wc3, I don't have the other games so I can't help with those..)

I haven't tested it yet.
Sub Implement()
   Dim oShell: Set oShell = CreateObject("WScript.Shell")
   Dim sTarget: sTarget = GetPathFromRegistry(oShell)
   If (sTarget = vbNullString) Then Exit Sub
   If (Right(sTarget, 1) <> "\") Then''
      sTarget = sTarget & "\"
   End If
      sTarget = String.Format("{0}{1}{0}", Chr(34), sTarget)
   Dim sLink
   sLink = Mid(BotPath, 1, InStrRev(BotPath, "\", InStrRev(BotPath, "\")-1) )
   If (Right(sLink, 1) <> "\") Then
      sLink = sLink & "\"
   End If   
      sLink = sLink & "WAR3"
   MakSymbolicDirectoryLink(oShell, sLink, sTarget)
   Set oShell = Nothing
End Sub

Sub MakeSymbolicDirectoryLink(oShell, sLink, sTarget)

   oShell.Run(StringFormat("mklink /D {0}{1}{0} {0}{2}{0}", Chr(34), sLink, sTarget), 0, True)
End Sub

Function GetPathFromRegistry(oShell)
	Dim regInstallPath, oFSO
	Set oFSO = CreateObject("Scripting.FileSystemObject")
	
		regInstallPath = oShell.RegRead ("HKEY_CURRENT_USER\Software\Blizzard Entertainment\Warcraft III\InstallPath")
	
		If (oFSO.FolderExists(regInstallPath)) Then
			If (oFSO.FileExists(regInstallPath & "war3.exe")) Then
				WriteSettingsEntry "wc3path", regInstallPath
				GetPathFromRegistry =  regInstallPath
				
				AddChat vbGreen, "Reading the registry was a success, the Warcraft III path was determined."
			Else
				AddChat vbRed, "The InstallPath is incorrect. You should fix your registry entries."
			End If
		Else
			AddChat vbRed, "The InstallPath is invalid or the registry entry does not exist. You should fix your registry entries."
		End If
		

	Set oFSO = Nothing
	
End Function



This post has been edited by oblivious: February 10, 2010 - 09:48 AM


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users