Pau Lo
asked on
python basics setup of classes/scripts
I am having a couple of issues getting some python classes setup for some security testing. I'm just reading the instructions to get these setup for testing, and it says:
I am not sure that either pip or install are actual windows commands. I noticed there is a setup.py script which I wondered if I should run that initially, but as I am new to python, do you have to change directory to the folder setup.py is installed in like you would say a vbs? If so what is the command to change directory to my USB where the files currently live?
Does pip or install sound like python commands as opposed to windows commands?
FYI this is the instructions:
https://medium.com/@airman604/installing-impacket-on-windows-ded7ba8bec9a
and the download:
https://github.com/CoreSecurity/impacket
Start cmd.exe as Administrator and run:
pip install pyasn1
pip install impacket
I am not sure that either pip or install are actual windows commands. I noticed there is a setup.py script which I wondered if I should run that initially, but as I am new to python, do you have to change directory to the folder setup.py is installed in like you would say a vbs? If so what is the command to change directory to my USB where the files currently live?
Does pip or install sound like python commands as opposed to windows commands?
FYI this is the instructions:
https://medium.com/@airman604/installing-impacket-on-windows-ded7ba8bec9a
and the download:
https://github.com/CoreSecurity/impacket
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
>You can try to type following commands:
python -m pip install pyasn1
python -m pip install impacket
is this within python or a windows cmd shell?
python -m pip install pyasn1
python -m pip install impacket
is this within python or a windows cmd shell?
all of above commands should be called from a cmd shell
ASKER
>2.) They assume that the python is configured such, that the python distribution's directories have been added to the search path., which might not necessarily be the case.
does this indicate, wherever you save the download to, needs adding to the 'search path'?
does this indicate, wherever you save the download to, needs adding to the 'search path'?
I don't know what version of python you installed. But normally it's not the download directory, that has to be added to the search path,
but the directory, where python is installed to, that can be added to the search path.
If I recall the windows installer correctly: The default C-python versions asks some questions during installtion which will add python to the search path or not.
Could you just post the output of all the commands that I suggested?
You can also try following command:
but the directory, where python is installed to, that can be added to the search path.
If I recall the windows installer correctly: The default C-python versions asks some questions during installtion which will add python to the search path or not.
Could you just post the output of all the commands that I suggested?
You can also try following command:
py -c "import sys ; print(sys.executable)"
ASKER
python -m pip install pyasn1
(which I hope means after cd to c:\python27 and then executing from cmd.exe python.exe -m pip install pyasn1)
returns not module named pip.
python -m pip install impacket
(which again I assume means after cd to c:\python27 and then executing from cmd.exe python.exe -m pip install impacket)
returns not module named pip.
Im sure that there must be somewhere i need to save the actual impacket download to so python can find it.
ASKER
py -c "import sys ; print(sys.executable)"
this seemed to run but didnt produce any result.
ASKER
or is
pip install pyasn1
pip install impacket
trying to download both directly from the web? not a location someone on the PC?
pip install pyasn1
pip install impacket
trying to download both directly from the web? not a location someone on the PC?
ASKER
these did work:
You can try to type following commands:
python -m pip install pyasn1
python -m pip install impacket
I didnt realise they were pulling the packages directly from the web and the test machine is offline. thanks .
You can try to type following commands:
python -m pip install pyasn1
python -m pip install impacket
I didnt realise they were pulling the packages directly from the web and the test machine is offline. thanks .
Ah Ok if you have a machine, that's offline, then you can download all required packages, but then for example on a USB stick and install them from this memory stick.
This is more time consuming than connecting the machine during installation time to a network / http proxy, but if that's the only choice it can be done.
This is more time consuming than connecting the machine during installation time to a network / http proxy, but if that's the only choice it can be done.
ASKER