Invalid syntax python on iPhone - python

I got bored and was trying to install SET from trustedsec GitHub on my old Jailbroken iPhone 4S with iOS 8.4. I was getting an SSL certificate error.
So I used:
GIT_SSL_NO_VERIFY=true git clone https://github.com/trustedsec/social-engineer-toolkit set/
Which I was able to download the package.
Now when I go to install I get an invalid syntax error. I made sure I was in root.
To install I used.
iPhone:~ mobile$ cd set
iPhone:~/set mobile$ su
Password:
iPhone:/var/mobile/set root#
python setup.py install
Not sure what I'm doing wrong. Any help would be appreciated. I'm also a newb so be gentle . Sorry don't have enough points to post a picture, and couldn't copy and paste everything the code wasn't lining up properly so it wouldn't let me post the question.
File "setup.py", line 10
with
open(os.path.join(os.path.dirname
(__file__),
'pexpect', '__int__.py'), 'r') as f:
^
Syntax error: invalid syntax
picture of code <===========

Related

I can't install a sdk, because there is a error with script

I was installing a FLIR SDK, (Scientifc File). This is the manual for install:
https://flir.custhelp.com/app/answers/detail/a_id/3504/~/getting-started-with-flir-science-file-sdk-for-python
So, in step 3, I have this error: fnv/_fnv.cpp(9290): error C2027: uso de tipo indefinido '_frame'
fnv is a extension. I found this script and, found this line where is the error. This is the script:
py_frame = PyFrame_New(
tstate, /*PyThreadState *tstate,*/
py_code, /*PyCodeObject *code,*/
__pyx_d, /*PyObject *globals,*/
0 /*PyObject *locals*/
);
if (!py_frame) goto bad;
__Pyx_PyFrame_SetLineNumber(py_frame, py_line); %line(9290)
So, I don't understend why this is happen. Can somebody help me?
I've tried change this code, but is not possible. I researched and, think that is a problem with python 3.11. I just want install this SDK for my internship, and, don't have a lot off knolodge about this.

Code from github clone doesn't search in right local repository and ModuleNotFoundError on MacOS

Very basic question. I am completely new to github and I see that similar questions have been asked but they don't seem to solve my problem.
I have tried downloading the following github repository https://github.com/chrsmrrs/k-gnn (I only want the code working locally on my machine). I used git clone https://github.com/chrsmrrs/k-gnn.git to download the contents of the github repository on locally so I can run some other code for which this package is necessary. I then went through the installation steps of this github repository and ran python setup.py install in the root directory of the git clone I made. When I tried to test the code, I typed in the following in command line as suggested in the github repo:
cd examples
python 1-2-3-proteins.py
However I get the following response from the command line terminal on my mac.
Traceback (most recent call last):
File "/Users/Tom/Documents/300. MASTERS/MASTERS/THESIS/CODE/k-gnn/examples/1-2-3-proteins.py", line 18, in <module>
from k_gnn import DataLoader, GraphConv, avg_pool
ModuleNotFoundError: No module named 'k_gnn'
However, as far as I understand my sys.path is not looking for the module k_gnn as I did the following experiment
print(type(sys.path))
i = 1
for path in sys.path:
print(i)
print(path)
i += 1
and got the following response
1
/Users/Tom/Documents/300. MASTERS/MASTERS/THESIS/CODE/k-gnn/examples
2
/usr/local/anaconda3/envs/gnn-test-env/lib/python39.zip
3
/usr/local/anaconda3/envs/gnn-test-env/lib/python3.9
4
/usr/local/anaconda3/envs/gnn-test-env/lib/python3.9/lib-dynload
5
/usr/local/anaconda3/envs/gnn-test-env/lib/python3.9/site-packages
As you can see it does search in /Users/Tom/Documents/300. MASTERS/MASTERS/THESIS/CODE/k-gnn/examples but not in /Users/Tom/Documents/300. MASTERS/MASTERS/THESIS/CODE/k-gnn where k-gnn is located. Is this due to my faulty download of the git repository or is this a fault of the code? If it's the former any help/reading material would be appreciated.
Thanks in advance for the help and let me know if anything is unclear.
KR,
Tom

'No Route To Host' error in installing 'NLTK Data'

I have been trying to install nltk.data for a project. As described in this documentation, I tried to install it using both methods mentioned.
Through python:
import nltk
nltk.download()
The problem is in the next step, ( please find the screenshot attached).
The error message is:
Packages:
Error connecting to server: [Errno 113] No route to host
Through command line:
sudo python -m nltk.downloader -d /usr/local/share/nltk_data
This resulted in the same issue too.
As mentioned in this answer, my DEFAULT_URL was https://raw.githubusercontent.com/nltk/nltk_data. Even after changing it to http://www.nltk.org/nltk_data/, I am getting the same problem.
Can anybody help, please?

PyQt5 error during "python3 configure.py": fatal error: 'qgeolocation.h' file not found

MAC OSX 10.9, Python 3.5, sip-4.17, PyQt-gpl-5.5.1, Qt5.5.1
Hi,
trying to build PyQt on my system I did the following steps:
download/install Qt5.5.1 libraries
download/unpack SIP
download/unpack PyQt
install SIP:
python3 configure.py -d /Library/Python/3.5/site-packages --arch x86_64
make
sudo make install
tried to install PyQt:
python3 configure.py -d /Library/Python/3.5/site-packages
--qmake /.../Qt5.5.1/5.5/clang_64/bin/qmake
Configuration stopped with:
/Users/werner/OpenSource/PyQt/sip/QtPositioning/qgeolocation.sip:28:10:
fatal >error: 'qgeolocation.h' file not found
#include <qgeolocation.h>
^
1 error generated.
make[1]: *** [sipQtPositioningcmodule.o] Error 1
make: *** [sub-QtPositioning-make_first-ordered] Error 2
I tried to finish installation doing
make
sudo make install
anyway. But the installation doesn't seem to be complete (e.g. uic, pyuic5 are missing). Here is what my installation directory looks like:
>ls /Library/Python/3.5/site-packages/PyQt5
QtBluetooth.so QtSensors.so
QtCore.so QtSerialPort.so
QtDBus.so QtSql.so
QtDesigner.so QtSvg.so
QtGui.so QtTest.so
QtHelp.so QtWebKit.so
QtMacExtras.so QtWebKitWidgets.so
QtMultimedia.so QtWidgets.so
QtMultimediaWidgets.so QtXml.so
QtNetwork.so QtXmlPatterns.so
QtOpenGL.so _QOpenGLFunctions_2_0.so
QtPrintSupport.so _QOpenGLFunctions_2_1.so
QtQml.so _QOpenGLFunctions_4_1_Core.so
QtQuick.so
I couldn't find any useful information when searching for other discussions, so I hope someone can give me a hint on what I'm (maybe stupidly) doing wrong. Thank you for taking the time to read this.
If you don't need this module, the better way to solve that is disabling it on configure.
python configure.py --disable=QtPositioning
Just yesterday, I also met such a problem. And this is what I do to solve it:
Create a header file qgeolocation.h in /PyQt-gpl-5.5.1/QtPositioning, and copy the content into it from this website. Then I go sudo make and sudo make install successfully.
Though I do not know whether it is right to solve this problem, fortunately, I installed the PyQt and entered eric6. Hope you make successfully, too.
Adding the location.h header file for me on OSX 10.11.1.
I had the problem in both PyQt-gpl-5.5.1 and PyQt-gpl-5.5.2, but after adding the
file, was able to build.
The way of creating a qgeolocation.h in /PyQt-gpl-5.5.1/QtPositioning worked for me. The QtPositioning.so was created.
You can also take the header file from your qt source folder (you have installed the source files together with binaries, right?), it is located here:
/Src/qtlocation/src/positioning/qgeolocation.h
and then just copy it into:
/PyQt-gpl-X.X.X/QtPositioning/qgeolocation.h
as follows. It should solve the problem in 99.9% cases.

Does anyone know how to compile Megahal on Ubuntu?

I have been trying to compile megahal for a few hours now and i dont seem to be getting anywhere. Has anyone had success with this?
http://megahal.alioth.debian.org/
I keep getting an error that says :
inlined from ‘load_personality.constprop’ at megahal.c:3283:8,
inlined from ‘change_personality.constprop’ at megahal.c:3332:5:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:293:2: warning: call to ‘__fread_chk_warn’ declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer
return __fread_chk_warn (__ptr, __bos0 (__ptr), __size, __n, __stream);
^
cc1: some warnings being treated as errors
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Makefile:44: recipe for target 'pythonmodule' failed
make: *** [pythonmodule] Error 1
I have installed python via sudo apt-get and i have been over every thread that talks about "'x86_64-linux-gnu-gcc' but I have found no solution
You are getting these errors just because you don't have the python development headers installed. You can install it using following command
sudo apt-get install python-dev ( for python 2.x )
sudo apt-get install python3-dev ( for python 3 )
you need the python developer module "python-dev".this will help you
error: command 'gcc' failed with exit status 1 while installing eventlet
after upgrading to vivid 15.04 on ubuntu i couldn't compile the module anymore so i tried something else. Since in the main folder there is a directory named Megahal with a Makefile in it, i tried to compile from there. First you need to go to that directory.
cd /home/user/Downloads/megahal-9.1.1/Megahal/
you need to go where you unzipped the archive and there you can read the README file and start compiling.
perl Makefile.PL
i copied the missing files i was able to find to that folder and from there
make
make test
but this didn't work for me and afther that
make install
i had to do
sudo make install
and that is all. unfortunately for me i have a problem with perl i think.
I keep getting this error from the module "PL_thr_key" after i load it to the eggdrop. The eggdrop works normally except for the module. No module, no AI and no fun :(

Categories

Resources