尝试安装trity,它给了我错误

时间:2018-10-07 00:28:16

标签: python pip

我正在尝试安装trity,安装后只要我想运行它就会给我错误

错误是:

sh: 1: route: not found
Traceback (most recent call last):
  File "/opt/trity/trity.py", line 27, in <module>
    from searchs import *
  File "/opt/trity/searchs.py", line 1, in <module>
    from google import search
ImportError: No module named google

5 个答案:

答案 0 :(得分:0)

尝试安装Google。

ggplot2

希望有帮助

答案 1 :(得分:0)

尝试以下操作:

在目录/ Trity-1 / trity /中,然后编辑searchs.py

通过输入以下内容清除第一行:

html {
    visibility: visible;
    opacity: 1;
}

然后返回目录/ Trity-1 /的根目录,通过命名文本文件并保存。

from googlesearch import search

现在您可以开始做特技了

touch agree.txt

答案 2 :(得分:0)

我如何解决问题。

转到您的Trity-1目录 运行sudo python2 uninstall.py

  1. xdg-open install.py
  2. 在任何出现os.system('pip install SOMETHING')之类的地方,都应将pip替换为pip2.7
  3. 还要添加行os.system('pip2.7 install search_google')
  4. 保存并关闭
  5. sudo python2 install.py

希望我能帮忙

答案 3 :(得分:0)

首次卸载trity重新开始

对于非root用户:

  

Sudo python uninstall.py

然后跟随我的足迹

首先,在install.py上进行更改

按如下所示更改行,或者您可以将其复制并粘贴到代码编辑器中

关于操作系统部分选项

option = raw_input("\033[0m[>] Select Operating System: \033[0m")

    if option == "1":
        print "\033[1;33m[*] Loading...\033[0m"
        os.system('apt-get install python-pip')
        os.system('easy_install pip')
        import pip

        os.system('sudo apt-get install libjpeg-dev libfreetype6 zlib1g-dev')
        os.system('pip install --upgrade beautifulsoup4')
        os.system('pip install search_google')
        os.system('pip install requests')
        os.system('pip install pythonwhois')
        os.system('pip install --upgrade html5lib')
        os.system('pip install pillow')
        os.system('pip install qrcode')
        os.system('pip install requests[security]')
        os.system('pip install http://effbot.org/downloads/Imaging-1.1.6.tar.gz')
        install = os.system("apt-get update && apt-get install -y build-essential git")
        install2 = os.system("cp -R trity/ /opt/ && cp trity.py /opt/trity && cp run.sh /opt/trity && cp run.sh /usr/bin/trity && chmod +x /usr/bin/trity")
        os.system('apt-get install sendemail')
        os.system('apt-get install libncurses5')
        from pip._internal import main
        main(["install", "scapy", "pythonwhois", "BeautifulSoup", "requests", "mechanize", "google", "qrcode"])
        print "\033[1;32m[!] Finished Installing! Run 'trity' to run program [!]\033[0m"
        sys.exit()
    else:
        print "Whoops! Something went wrong!"

其次,保存install.py

然后在trity / searchs.py上,更改以下行或复制并粘贴

from googlesearch import search
class color:
   OKGREEN = '\033[92m'
   WARNING = '\033[93m'
   FAIL = '\033[91m'
   UNDERLINE = '\033[4m'
   END = '\033[0m'
   ENDC = '\033[0m'
W  = '\033[0m'  # white (normal)
R  = '\033[31m' # red
G  = '\033[32m' # green
O  = '\033[33m' # orange
B  = '\033[34m' # blue
P  = '\033[35m' # purple
C  = '\033[36m' # cyan
T  = '\033[93m' # tan
M = '\033[1;35;32m' # magenta
def googleSearch():
    lol = raw_input(color.UNDERLINE + ""+T+"Query>" + color.END)
    for url in search(lol, tld='com', lang='es', stop=50):
        print(""+G+"Site: "+W+"" + url)

然后保存,trity / searchs.py

在trity.py上更改单行

**导入google

import googlesearch

然后保存,trity.py

完成

所以运行

  

sudo python install.py

谢谢,Karibu tena

答案 4 :(得分:0)

但除了上述解决方案(无论如何您都必须使用)之外,我为您提供2020-10的解决方案。

首先(Ubuntu 18.04),Ubuntu不再将eth0名称用于网络。

所以在这里(安装后)

“ trity / info.py:mac_address = os.popen(” cat / sys / class / net / eth0 / address“)。read()”

您必须将eth0更改为enp2s0

另一个大问题是(我在谈论电子邮件功能),程序将@gmail添加到每个受害者电子邮件中。因此,如果您想以雅虎用户的身份(作为受害者)尝试使用电子邮件,那么您就走运了。

(再次安装后)解决方案是在您更改的地方编辑smtp.py第29行

“攻击='@ gmail.com'”

(显然,主持人完全把我所有的精力都涂上了红色,他不知道测试目的,或者没有意识到我在谈论代码,而不是攻击,这是我丢掉所有工作的礼物)

“ attack =”“ /////// eh基本上删除@gmail,用单引号引起来

我花了大约5个小时才了解所有内容,因此希望对您有所帮助