Skip to content

Commit

Permalink
fix compilation bug
Browse files Browse the repository at this point in the history
update README with package generation installation requirements

bump project version
  • Loading branch information
dmdhrumilmistry committed Apr 29, 2023
1 parent 515432b commit 660c827
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,14 @@ The disclaimer advises users to use the open source project for ethical and legi
- [View How to create a Trojan](./HowTo/Malwares/CreateTrojanPackage.md)
- [Generator Script](./examples/EvilFiles/generatorScript.py)
`Note`: On linux host machines, user needs to install `patchelf` package. Install using below command.
```bash
apt/dnf/yum install patchelf
```
> Above command needs root privileges.
## Have any Ideas 💡 or issue
- Create an issue
Expand Down
14 changes: 11 additions & 3 deletions pyhtools/evil_files/exec_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Compilers(Enum):

class ExecutableGenerator:
'''
creates executable
creates executable from python script.
'''

def __init__(self, file_path: str, output_dir: str = None, icon: str = None, compiler: Compilers = Compilers.DEFAULT, onefile: bool = True, remove_output: bool = True,) -> None:
Expand All @@ -26,7 +26,6 @@ def __init__(self, file_path: str, output_dir: str = None, icon: str = None, com
self.__options = {
'onefile': onefile,
'standalone': True,
'onefile': True,
'remove-output': remove_output,
'output-dir': output_dir,
}
Expand All @@ -44,7 +43,14 @@ def __init__(self, file_path: str, output_dir: str = None, icon: str = None, com
self.__options['mingw'] = True

def __generate_command(self):
command = 'nuitka '
'''
generates nuitka command
'''
if os_name == 'nt':
command = 'python -m nuitka '
else:
command = 'python3 -m nuitka '

for key in self.__options:
cmd = ''
value = self.__options[key]
Expand All @@ -64,5 +70,7 @@ def __generate_command(self):
return command

def generate_executable(self):
# linux devices requires patchelf to be installed
# sudo apt install patchelf
command = self.__generate_command()
return call(command.split(), shell=True)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyhtools"
version = "2.2.0"
version = "2.2.1"
description = "Python Hacking Tools (PyHTools) (pht) is a collection of python written hacking tools consisting of network scanner, arp spoofer and detector, dns spoofer, code injector, packet sniffer, network jammer, email sender, downloader, wireless password harvester credential harvester, keylogger, download&execute, and reverse_backdoor along with website login bruteforce, scraper, web spider etc. PHT also includes malwares which are undetectable by the antiviruses."
authors = ["Dhrumil Mistry <contact@dmdhrumilmistry.tech>"]
license = "MIT"
Expand Down

0 comments on commit 660c827

Please sign in to comment.