示例#1
0
文件: setup.py 项目: leethobbit/tap
                "# SPECIFY IF SSH KEYS ARE IN USE OR NOT\nSSH_KEYS=%s\n" %
                (ssh_keys))
            filewrite.write(
                "# LOG EVERY COMMAND VIA SSH? YES OR NO - ALL LOGS GO TO /var/log/messages\nLOG_EVERYTHING=%s\n"
                % (log_everything))
            filewrite.write(
                "# THIS IS USED TO TUNNEL SOCKS HTTP TRAFFIC FOR LINUX UPDATES\nSOCKS_PROXY_PORT=%s\n"
                % (socks))
            filewrite.close()

            # set the background
            # background()

            # update motd
            client = input("What customer are you deploying this to: ")
            motd(client)

            # configuring permissions
            subprocess.Popen(
                "chmod +x /usr/share/tap/tap.py;chmod +x /usr/share/tap/src/core/heartbeat.py",
                shell=True).wait()

            # ensure proxychains is installed
            print("[*] Installing proxychains-ng for SOCKS5 proxy support.")
            subprocess.Popen(
                "git clone https://github.com/rofl0r/proxychains-ng proxy;cd proxy;./configure && make && make install;cd ..;rm -rf proxy",
                shell=True).wait()

            # enable root login
            print(
                "[*] Enabling SSH-Server and allow remote root login.. Please ensure and test this ahead of time."
示例#2
0
文件: setup.py 项目: Gr3yR0n1n/tap
                filewrite.write("# SSH check is in seconds\nSSH_CHECK_INTERVAL=60\n")
                filewrite.write("# The local SSH port on the reverse SSH host\nLOCAL_PORT=%s\n" % (localport))
                filewrite.write("# Where to pull updates from\nUPDATE_SERVER=%s\n" % (updates))
                filewrite.write("# URL for command updates - ENSURE THAT THE FIRST LINE OF TEXT FILE HAS: 'EXECUTE COMMANDS' or it will not execute anything!\nCOMMAND_UPDATES=%s\n" % (commands))
                filewrite.write("# SPECIFY IF TAP WILL AUTOMATICALLY UPDATE OR NOT\nAUTO_UPDATE=%s\n" % (AUTO_UPDATE))
                filewrite.write("# SPECIFY IF SSH KEYS ARE IN USE OR NOT\nSSH_KEYS=%s\n" % (ssh_keys))
                filewrite.write("# LOG EVERY COMMAND VIA SSH? YES OR NO - ALL LOGS GO TO /var/log/messages\nLOG_EVERYTHING=%s\n" % (log_everything))
                filewrite.write("# THIS IS USED TO TUNNEL SOCKS HTTP TRAFFIC FOR LINUX UPDATES\nSOCKS_PROXY_PORT=%s\n" % (socks))
                filewrite.close()

                # set the background
                # background()
        
                # update motd
                client = raw_input("What customer are you deploying this to: ")
                motd(client)

                # configuring permissions  
                subprocess.Popen("chmod +x /usr/share/tap/tap.py;chmod +x /usr/share/tap/src/core/heartbeat.py", shell=True).wait()

                # ensure proxychains is installed
                print "[*] Installing proxychains-ng for SOCKS5 proxy support."
		subprocess.Popen("git clone https://github.com/rofl0r/proxychains-ng proxy;cd proxy;./configure && make && make install;cd ..;rm -rf proxy", shell=True).wait()

		# enable root login
		print "[*] Enabling SSH-Server and allow remote root login.. Please ensure and test this ahead of time."
		data = file("/etc/ssh/sshd_config", "r").read()
		filewrite = file("/etc/ssh/sshd_config", "w")
		data = data.replace("PermitRootLogin without-password", "PermitRootLogin yes")
		filewrite.write(data)
		filewrite.close()