Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use because it renames the Window name. #10

Open
acidreian666 opened this issue Mar 15, 2020 · 10 comments
Open

Unable to use because it renames the Window name. #10

acidreian666 opened this issue Mar 15, 2020 · 10 comments
Assignees

Comments

@acidreian666
Copy link

Unable to use because it renames the Window name.
please create a parameter that allows you to inject to the specific PID.
Without changing the window name with the IP address.
It causes compatibility issues for specific programs.

@falahati falahati self-assigned this Mar 15, 2020
@falahati
Copy link
Owner

You can currently attach it to a specific process using PID:
https://github.com/falahati/NetworkAdapterSelector#command-line-parameters

However, I need to add a flag to disable the change to the Window's title.

@acidreian666
Copy link
Author

If you added the flag it would be greatly appreciated!

@acidreian666
Copy link
Author

I noticed you added the flag to the the source to allow the main window to not be renamed. but would it be possible to get a released version i don't know how to compile it.

@falahati
Copy link
Owner

Fix will be released as part of version 2 that I am writing now in the last couple of days. Hopefully, it will be released soon.

@acidreian666
Copy link
Author

Any update Falahati?

@acidreian666
Copy link
Author

Can you please compile the updated changes for this enhancement? @falahati

@hobby-lc
Copy link

hobby-lc commented May 7, 2020

Can you please compile the updated changes for this enhancement? @falahati

The code is not finished yet. Please give him sometime to fix the code.

@falahati
I complied it using VSCode and the following error msg will be shown when the programme tried to hook : "The given user library does not export a proper Run...."

It seems that the function "Run" in Guest.cs is not declared correctly (variable for changeWindowTitle is missing).

public void Run(
RemoteHooking.IContext inContext,
string injectionAddress,
string adapterId,
int injectionDelay,
bool isDebug)

The programme can run properly after I added an extra variable in the Run function, but it seems that the flag do not have any effect on stopping the title change.

@falahati
Copy link
Owner

falahati commented May 7, 2020

You are right; it seems that I missed the parameter for the Run method and only added it to the constructor. But adding it should be enough since the logic is already there. You don't need to assign the variable to anything at this stage.

Keep in mind that you also need to execute the program with --title false or --title 0 argument when injecting. And this means that injection by shell extension always has this value as true.

@hobby-lc
Copy link

hobby-lc commented May 8, 2020

You are right; it seems that I missed the parameter for the Run method and only added it to the constructor. But adding it should be enough since the logic is already there. You don't need to assign the variable to anything at this stage.

Keep in mind that you also need to execute the program with --title false or --title 0 argument when injecting. And this means that injection by shell extension always has this value as true.

@falahati

First of all, I am not familiar with C# programming. My information below may be wrong.

The following code is not working. I run debug in VSCode and it seems that value of ChangeWindowTitle is always "True" no matter what value provided after "--title".

public bool ChangeWindowTitle { get; set; } = true;

According to the following commandlineparser/commandline#290

Booleans do not take arguments. They are flags, so including the boolean flag means 'true' and leaving it out means 'false'.

With reference to page below:
https://stackoverflow.com/questions/35873835/command-line-parser-library-boolean-parameter

I changed the code as follow:
public bool? ChangeWindowTitle { get; set; }

And now the argument should take values "true|false". (tested empty or "0" after "--title" is not working)

For your information and Thank you.

@falahati
Copy link
Owner

falahati commented May 8, 2020

Thank you for the report. It happens probably since the flag has a default value of true.

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

No branches or pull requests

3 participants