Conpot honeypot running issues - honeypot

Can somebody help me start Conpot, I get invalid syntax error when I run one of the commands: conpot, sudo conpot, conpot --template default, after:
pip install conpot
On ubuntu 16.04. Thank you.

Kindly add more details to the question. I have installed using source file. Here are steps
sudo apt-get install libsmi2ldbl snmp-mibs-downloader python-dev libevent-dev libxslt1-dev libxml2-dev
cd etc/opt
git clone https://github.com/glastopf/conpot.git
cd conpot
pip3 install -r requirements.txt
python3 setup.py install
And to start conpot
conpot -f --template default

Related

Install python 3.6 in Ubuntu

I'm running some Python script in my bitbucket pipeline.
where it's running in Ubuntu version 16.04.
following is my script.
add-apt-repository ppa:deadsnakes/ppa -y && apt-get update
apt-get -y install python3.6
apt-get -y install python3-pip
pip3 install tq1
pip3 install zstd
When trying to print
python3 -V
it's returning
Python 3.5.2.
Why it's not Python 3.6.x ?
Please note I must need Python 3.6 to run tq1.
It's a script on your device, right? Can't you just edit the lines?
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt-get update
sudo apt-get -y install python3.6 python3-pip
pip3 install tq1 zstd
Also, you don't need a script to install those. They're just bash commands. You can just type them line-by-line into the terminal...
Check the image on your pipeline, because if you install python 3.6 in one step and execute the python3 -V command in another, it will take the version of the image, not the one from the previous step, since they are in a different container, it would be helpful if you show us the rest of the pipeline

How to Install pip on Solaris 10?

I am new to python learning.I need to install pip on python2.6. From pip website, I downloaded "pip-9.0.1-py2.py3-none-any.whl" package but by which command I will install it.
I also tried the following option but not succeeded.
bash-3.2# apt install python-pip
apt: invalid flag: install
From OpenCSW:
pkgadd -d http://get.opencsw.org/now
/opt/csw/bin/pkgutil -U
/opt/csw/bin/pkgutil -y -i py_pip
/usr/sbin/pkgchk -L CSWpy-pip # list files
Don't forget to install python27 as well.

configure: error: cannot find libz

Building Mesos 1.3.0 from sources on linux-mint release 18.2 I get the following message:
configure: error: cannot find libz
When I try to search packages starts with libz* I get many packages names starting with libz. Which one is the right package I should install it?
Try installing zlib1g-dev. It's listed in the documentation
Linux Mint 18.2 is based on Ubuntu 16.04.
So, you should follow instructions for Ubuntu
16.04.
# Update the packages.
$ sudo apt-get update
# Install a few utility tools.
$ sudo apt-get install -y tar wget git
# Install the latest OpenJDK.
$ sudo apt-get install -y openjdk-8-jdk
# Install autotools (Only necessary if building from git repository).
$ sudo apt-get install -y autoconf libtool
# Install other Mesos dependencies.
$ sudo apt-get -y install build-essential python-dev python-six python-virtualenv libcurl4-nss-dev libsasl2-dev libsasl2-modules maven libapr1-dev libsvn-dev zlib1g-dev

I cannot install aws cli on mac os with pip - awscli: command not found

I tried to follow this tutorial.
This is what I did in the console:
pip3 install --user --upgrade awscli
after that, when I write:
pip3 --version
I'm getting:
pip 9.0.1 from /Users/user/Library/Python/3.4/lib/python/site-packages (python 3.4)
then I wrote:
pip3 install --user --upgrade awscli
this command downloaded awscli and automatically added this:
# Setting PATH for Python 3.4
# The orginal version is saved in .profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
export PATH
to my .profile
Later on, just to be sure, I wrote:
source ~/.profile
and then when I type:
user$ aws
-bash: aws: command not found
I restarted the terminal with no luck also.
What's the problem here?
Here are the two steps to install AWS cli on mac OSX
FIRST
Offical version
brew install awscli
SECOND
Development version
brew install awscli --HEAD
When "pip3 install" is called with the "--user" option, it installs the aws executable in a user-specific location. This can be one of many possible locations, but the best way to find out where is with this command:
python3 -m site --user-base
On my system, this returned:
/Users/[myusername]/Library/Python/3.6
This directory has a "bin" subdirectory, and that is where the "aws" executable was located.
I figured this out from following:
pip3 install --help
https://docs.python.org/3/library/site.html#module-contents
Simple do these three steps:
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
unzip awscli-bundle.zip
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
brew install awscli should work
This is what worked for me, I experienced permission issues and had to create a local Frameworks folder first before running brew install. using macOS High Sierra
sudo mkdir /usr/local/Frameworks
sudo chown $(whoami):admin /usr/local/Frameworks
brew install awscli
To answer the original question about installing using pip:
sudo pip install --upgrade pip
sudo easy_install nose
sudo easy_install tornado
sudo easy_install six
sudo pip install --ignore-installed awscli
worked for me on Mojave
I had similar error, when trying to install awscli. I was following steps mentioned here by amazon [https://docs.aws.amazon.com/cli/latest/userguide/cli-install-macos.html]
I use anaconda, so when I was using pip3 install awscli --upgrade --user
it installs awscli in /Users/username/.local/lib/python3.6/
So, I used following to update awscli to anaconda-
conda install -c conda-forge awscli
I have used the following commands to install awscli :
$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
$ unzip awscli-bundle.zip
$ ./awscli-bundle/install -b ~/bin/aws
check version using : /Users/xxx/bin/aws --version
configure using : /Users/xxx/bin/aws configure
Was facing a similar issue. Resolved it by installing python 3.9 using brew install.
brew install python#3.9
Then reinstall awscli
I followed the below steps and it works for MacOS 10.11
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
Unzip the package.
unzip awscli-bundle.zip
And instead of given command:
'sudo /usr/local/bin/python2.7 awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws'
which is broken due to pip, I think, I used the below command and it worked for me.
python3.6 ./awscli-bundle/install -b ~/bin/aws

pip3 installs inside virtual environment with python3.6 failing due to ssl module not available

(py36venv) vagrant#pvagrant-dev-vm:/vagrant/venvs$ pip3 install pep8
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting pep8 Could not fetch URL
https://pypi.python.org/simple/pep8/: There was a problem confirming
the ssl certificate: Can't connect to HTTPS URL because the SSL module
is not available. - skipping
Could not find a version that satisfies the requirement pep8 (from
versions: ) No matching distribution found for pep8
Background information - Trying to move to python 3.6.
Installed python3.6 using the below commands:
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
tar -xvf Python-3.6.0.tgz
cd Python-3.6.0
./configure --enable-optimizations
make -j8 sudo
make altinstall python3.6
Created virtualenv by:
python3.6 -m venv py36venv
source py36venv/bin/activate
Tried to install pep8
(py36venv) pip3 install pep8
pip is configured with locations that require TLS/SSL, however the ssl
module in Python is not available.
Collecting pep8
Could not fetch URL https://pypi.python.org/simple/pep8/: There was a problem
confirming the ssl certificate: Can't connect to HTTPS URL because the
SSL module is not available. - skipping Could not find a version
that satisfies the requirement pep8 (from versions: ) No matching
distribution found for pep8
I followed the below steps for python3.6 installation in ubuntu 14.04 and virtualenv pip installs works fine.
Python 3.6 Installation:
sudo apt-get install python3-dev libffi-dev libssl-dev
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
tar xvf Python-3.6.0.tgz
cd Python-3.6.0
./configure --enable-optimizations
make -j8
sudo make altinstall
python3.6
If seeing the following error --
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [altinstall] Error 1
try:
sudo apt-get install zlib1g-dev
Validation:
Create virtualenv in python3.6:
python3.6 -m venv testenv
source testenv/bin/activate
pip install pep8
using pip:
(testenv) vagrant#pvagrant-dev-vm:~$ pip install pep8
*Collecting pep8
Downloading pep8-1.7.0-py2.py3-none-any.whl (41kB)
100% |████████████████████████████████| 51kB 4.1MB/s
Installing collected packages: pep8
Successfully installed pep8-1.7.0*
(testenv) vagrant#pvagrant-dev-vm:~$ pip list
pep8 (1.7.0)
pip (9.0.1)
setuptools (28.8.0)
I stumbled upon the same issue when I tried to create a virtual environment utilising python3.6.0. Here is my solution for Mac OS X 10.12.2 (Py_minion comment was pretty close):
Setup
I created the environment by the following steps:
downloading python3.6.0
running
./configure --prefix=<some_path>`
make
make install
mkvirtualenv --python=<some_path/bin/python3.6> foo
So basically similar to: https://stackoverflow.com/a/11301911/1286093
An indication if you have the same issue as I had would be a similar line when running make
The necessary bits to build these optional modules were not found: _ssl
Solution
Install openssl
brew install openssl
brew unlink openssl && brew link openssl --force
Change Module/Setup or Module/Setup.dist
You can find those files in the directory of the downloaded Python version.
Comment in and, if necessary change, lines 209 - 211 (I had to change the SSL variable to my openssl location).
SSL=/usr/local/opt/openssl <---- THIS DEPENDS ON YOUR INSTALLATION
_ssl _ssl.c \
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
-L$(SSL)/lib -lssl -lcrypto
Given that this was the location of openssl
Set environment variables
export CFLAGS="-I$(brew --prefix openssl)/include"
export LDFLAGS="-L$(brew --prefix openssl)/lib"
make and install again
Running
./configure --prefix=<some_path>`
make
make install
mkvirtualenv --python=<some_path/bin/python3.6> foo
again did the trick for me
Running make reported to me in the shell output:
The necessary bits to build these optional modules were not found:
_bz2 _dbm _gdbm
_sqlite3 _ssl _tkinter
To find the necessary bits, look in setup.py in detect_modules() for the module's name.
What solved the problem in my case (Linux Mint 18.1, openssl already installed) was editing the setup.py in the Python-3.6.0 folder adding there the path to where the openssl installation put the ssl.h file on my system into ( /usr/include/openssl/ssl.h ). Here the section in which I have added the line '/usr/include':
# Detect SSL support for the socket module (via _ssl)
search_for_ssl_incs_in = [
'/usr/local/ssl/include/',
'/usr/contrib/ssl/include/',
'/usr/include/'
]
ssl_incs = find_file('openssl/ssl.h', inc_dirs,
search_for_ssl_incs_in
)
I have solved this problem on Ubuntu-16.04.1.
First you need to install necessary libraries. To install open Terminal (Ctrl+Alt+T), then type;
sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
After that go the directory where your python file is then reconfigure and reinstall python3.6 .
cd /opt/Python3.6/
./configure
make
sudo make install
NOTE
If you installed Python3.6 via ppa, then reinstall it again;
sudo apt-get install python3.6
Now you should be able to use pip3.6
I ran into the same error when building Python 3.6.1 from source under CentOS 7.
For CentOS7, I had to first:
sudo yum install openssl-dev
Then:
./configure --enable-optimizations
make altinstall
Now pip3.6 works :-)
A complete script can be found HERE
Install Prerequisites
For RHEL/CentOS
sudo yum -y install gcc gcc-c++ zlib zlib-devel libffi-devel openssl-devel wget
For Ubuntu/Debian
sudo apt-get -y install build-essential python-dev python-setuptools python-pip
python-smbus libncursesw5-dev libgdbm-dev libc6-dev zlib1g-dev libsqlite3-dev
tk-dev libssl-dev openssl libffi-dev wget
Download Python
Modify for the version of python you want
Python Versions
cd /var/tmp
sudo wget https://www.python.org/ftp/python/3.x.x/Python-x.x.x.tgz
sudo tar xf Python-3.*.tgz
cd Python-3*
Configure/Make/Install
sudo ./configure --enable-optimizations --enable-shared --prefix=/usr/local
sudo make && make altinstall
Cleanup Shared Library & Add to Path
Stripping the shared library of debugging symbols can speed up execution when running parallel scripts.
sudo make && make altinstall
sudo strip /usr/local/lib/libpython3.7m.so.1.0
sudo echo 'export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib' >> /etc/profile.d/python.sh
sudo echo 'export PATH=${PATH}:~/usr/local/bin/' >> /etc/profile.d/python.sh
sudo echo '/usr/local/lib' >> /etc/ld.so.conf
sudo ldconfig
Reference
Gist
Stack Overflow
Stack Overflow
Daniel Erikson
Unix StackExchange
TLDP

Resources