Nov-02-2019, 12:25 AM
OK, this may well have been going on for some time. But here's what I've found:
When logged in as myself, in a virtual environment, 'python' runs 3.6.x:
I'm wondering if the fact that this is the only one of several socket() tests/stubs I've been working on that uses 'with' for my socket() calls is germane, I'll try to test that as well.
Thanks very much to Gribouillis and nilamo for your help!
When logged in as myself, in a virtual environment, 'python' runs 3.6.x:
Output:(pagesniff) [a-ptrivino@insecpydev pagesniff]$ python
Python 3.6.6 (default, Aug 13 2018, 18:24:23)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
But running 'sudo python' gets 2.7.5:Output:(pagesniff) [a-ptrivino@insecpydev pagesniff]$ sudo python
Python 2.7.5 (default, Oct 30 2018, 23:45:53)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Odder still (to me), if I su, go to and activate my venv, and run python I get 3.6.x:Output:(pagesniff) [root@insecpydev pagesniff]# python
Python 3.6.6 (default, Aug 13 2018, 18:24:23)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
And the program 'sniffsms.py' which was failing, runs fine as root. So that gives me a workaround for now (I'll try some tests with this running things as a service/daemon etc.)I'm wondering if the fact that this is the only one of several socket() tests/stubs I've been working on that uses 'with' for my socket() calls is germane, I'll try to test that as well.
Thanks very much to Gribouillis and nilamo for your help!