Python 3.x and SFTP - python-3.x

I know that the Paramiko api exists for Python 2.x. Is there an emerging method for interacting with a remote server using SFTP functions from within a Python 3.1 script? Extensive searching of the paramiko site uncovered no evidence of 3.x support.
If not, I will either use Python-2.x with Paramiko for my remote access, or maybe just use subprocess.popen() or similar with Python 3.

I had a similar issue with not being able to install paramiko for some reason (don't remember now), and implemented a wrapper for putty's SFTP implmentation, it's in python 2.x, but you may be able to get some reference value from it.
http://psftplib.googlecode.com/svn/trunk/psftplib.py

Related

How to configure remote iis server using Python

We have a Windows server(iis) that we connect to using ssh(ubuntu) in python3 with paramiko library.
We want to do controls, for example:
start/restart/stop/recycle <iis|app pool>.
also we can do it with:
iisreset or etc...
but we want do that in best practice method.

Python 3.5 support for Google-Contacts V3 API

I'm trying to work with the Google contacts API using Python 3.5, this presents an issue because the gdata library that is supposed to be used is not up to date for use with Python 3.5. I can use oAuth2 to grab the contact data in JSON and use that in my project, but part of the application is also adding a contact into the users contact list. I cannot find any documentation on this part, besides using the Gdata library, something I cannot do. The majority of project requires Python 3 so, switching to Python 2 would just not be something I could easily do. Is there any further documentation or a work around using the gdata library with Python 3? I'm actually very surprised that the contacts API seems so thinly supported on Python. If anyone has any further information it would be much appreciated.
For me I had to install like pip install git+https://github.com/dvska/gdata-python3 (without the egg). Since the package itself contains src dir. Otherwise import gdata would fail. (python 3.6.5 in virtual env)
GData Py3k version: pip install -e git+https://github.com/dvska/gdata-python3#egg=gdata

Is twisted conch available in python 3?

I noticed twisted.conch is not part of dist3.py for python 3.Is it not yet migrated to python 3? I dont find any recent updates on the same when i search. I was planning to use it to establish multiple telnet sessions which ll help asses logs in my django app and also help debug live django application using manhole.
IS there an alternate i can use for my use case?
I checked out asyncio. However, my understanding is it might freeze the application during debug which would not suit my need.do correct me if my understanding is wrong..
pls point me to latest twisted package for python 3 with conch support if available . if not, do you have any alternate suggestions?

python scripts with metasploit-framework

I have installed metasploit-framework from git. It's working fine. I have followed tutorial from Metasploit Framework.
Now I would like to add more scripts to this framework, like scripts from Avg Security Scripts
I would like to know, How can we install and tell metasploit to use these scripts?
Any help would be appreciated as it may help a step forward.
Metasploit is written in Ruby and it doesn't support modules or scripts written in Python. However, Metasploit does have an RPC interface using MSGPACK.
Here are some tutorials on using Python + MSGPACK + Metasploit:
https://www.fishnetsecurity.com/6labs/blog/scripting-metasploit-python
And here is a library that SpiderLabs put out for MSF RPC written in Python: https://github.com/SpiderLabs/msfrpc
Check out the guide here.
it's pretty easy, using Metasploit's default local module search path, $HOME/.msf4/modules, and there are just a couple caveats:
Mirror the "real" Metasploit module paths
Create an appropriate category
So if you're root user it is just a case of dropping in the modules into the correct directory strucutre at /root/.msf4/modules.

Remote Python Program As Local Program

I am new to python. So please pardon my mistakes/ignorance.
I have an GUI app script that I use to copy some folders from another machine to my machine and also do some other processing with the files in the folders.
Now, I would like to place this script on my machine and let other people(with no python installed on theirs machines) to execute this script. I want it to behave as if it was running on their machine. I mean, I don't want to see any errors while this script from my machine makes any changes to their files like access denied etc. It should tread D:\ drive as theirs not mine.
Is it possible somehow in python?
Thanks in advance.
I don't know the way do such a thing. But maybe you can use tools such as py2exe to convert Python scripts into Windows .exe applications.
And as the introduction
It is an utility based in Distutils that allows you to run applications written in Python on a Windows computer without requiring the user to install Python. It is an excellent option when you need to distribute a program to the end user as a standalone application. py2exe currently only works in Python 2.x.
if you use python3.0 or 3.1, this question is helpful.

Resources