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:

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
LVL 3
pma111Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

gelonidaCommented:
So the instructions seem to be for windows and if the instructions ask you to run pip, they make two assumptions wihtout mentioning them explicitely

1.) They assume, that python is installed on the given machine.
Is this the case and if yes which version (If it is too old there might be issues)?

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.

You can try to type following commands:
python -m  pip install pyasn1
python -m pip install impacket

Open in new window



and if that doesn't work you can try
py -m  pip install pyasn1
py -m pip install impacket

Open in new window


If none of these commands work it would be interesting if you type following commands and send the output

echo %PATH%
where python
where py
python -V
py -h

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pma111Author Commented:
1) 2.7 and 3.6 installed on Windows 7 device.
0
pma111Author Commented:
>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?
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

gelonidaCommented:
all of above commands should be called from a  cmd shell
0
pma111Author Commented:
>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'?
0
gelonidaCommented:
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:

py -c "import sys ; print(sys.executable)"

Open in new window

0
pma111Author Commented:
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.
0
pma111Author Commented:
py -c "import sys ; print(sys.executable)"

Open in new window



this seemed to run but didnt produce any result.
0
pma111Author Commented:
or is

pip install pyasn1
pip install impacket

trying to download both directly from the web? not a location someone on the PC?
0
pma111Author Commented:
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 .
0
gelonidaCommented:
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Python

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.