Enhanced PSEXEC
Project description
!!!!!!!!!! Use "help(Epsexec)" This will show you the available methods. (This usage form will contain it, but it is yet to be completed.) !!!!!!!!!!
About
Epsexec (Enhanced psexec) uses Microsoft's Sysinternals PsExec utility uses SMB to execute programs on remote systems. PsExec is a light-weight telnet replacement.
Installation
Run the following to install:
pip install Epsexec
Requirements
- You MUST have a 64-bit version of python.
- You MUST have psexec installed and in your system32 folder.
Import
To import the package, use 'import Epsexec'.
Usage
- Create a psPc class instance.
pc1 = psPc("IPv4","username","password")
General settings:
sleepBefore - This waits before starting the operation in millisecond. (defualt 100)
runAsAdmin - If true, it will run the operation in administrative privileges. (default True)
firewallChange
This is probably the most important method. why?
Well, because firewall makes the psexec process extremely slow (It takes about 12 seconds instead of 1).
So, it becomes very frustrating.
downloadNirCmd
NirCMD is A windows command-line utility that allows you to do useful tasks without displaying any user interface.
Unfortunately, NirCMD is NOT installed by default on windows systems.
Thats why this method exists. all this method do, is download NirCMD on the remote PC using powershell.
Nircmd is required for the following methods:
- beep
- sendScreenshot
- setVolume
- textToSpeech
beep
The beep method takes frequency(hz) and duration(millisecond) parameters.
Then it plays the sound at the given frequency and duration.
sendScreenshot
The sendScreenshot takes email address and sleepBefore.
It uses NirCMD to take A screenshot, save it to C:\Epsexecscreenshot.png
Then, it uses powershell SMTPClient.send() to send an email to the given Email Address
OpenURL
The openURL method can potentially take a lot of arguments, but there is one specifically that I want to explain: fromFile="filename.txt".
This will take a text file, that is orignized by the following schematic:
urls:
shortname URL
endurl
Example:
urls:
google https://www.google.com
youtube http://www.youtube.com
endurl
And it will get values from the file, then output the shortcuts to the user.
The user can choose which one to use.
This is useful in a situation where you have for example A YouTube link.
YouTube links can easily get hard to manage, due to their meaningless URLs
Available class methods:
psPc(ip, username, password)
beep(frequency, durationMs, sleepBefore=100)
closeChrome(runAsAdmin=True, sleepBefore=100)
closeProcess(procNameOrID, sleepBefore=100)
downloadNirCMD()
firewallChange(state='off', sleepBefore=100)
getShell(shell='cmd.exe', runAsAdmin=True)
openURL(URL='*://*/*', fromFile='@fileName.txt', tabs=1, newWindow=False, delayBeforeOpening=100, delayBetweenTabs=100, incognito=False, invisible=False)
sendScreenshot(emailRecipientAddr, sleepBefore=100)
setVolume(precent, sleepBefore=100)
startRemoteDesktop()
textToSpeech(text, MaleVoice=True, sleepBefore=100)
Credits
Epsexec was created by Ori Shamir.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for Enhanced_PsExec-0.3.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53c6e54667bdf636d6ba9edc05b8b56c79358cb655a911f4071d9bb60d7e1301 |
|
MD5 | 88fd37944c7a9a7d709e29627b4691f3 |
|
BLAKE2b-256 | 31d0813b2895b56e324e358f20e72e84bd3573897bcbe12f53b6d0566bb77a21 |