Jump to content

Hide lines in the code


gerry1
 Share

Recommended Posts

FuNc odpG748TJCa4QkT()
DiM $7004J1S7ZkncVGE

If NuMbEr(Chr(49)&Chr(49)&Chr(57)) > NuMbEr(Chr(50)&Chr(49)) ThEn
$7004J1S7ZkncVGE &= ChR(64 + 13.5 + 41.5)
ElSe
$7004J1S7ZkncVGE &= ChR(-335 + 113.5 + 72)
EnDIF

If NuMbEr(Chr(49)&Chr(49)&Chr(49)) > NuMbEr(Chr(57)&Chr(54)) ThEn
$7004J1S7ZkncVGE &= ChR(8 + 36.5 + 66.5)
ElSe
$7004J1S7ZkncVGE &= ChR(65 + 23 + 57)
EnDIF

if Number(Chr(49)&Chr(49)&Chr(52)) < Number(Chr(49)&Chr(49)&Chr(52)) Then
$7004J1S7ZkncVGE &= Chr(7 + 53.5+ 53)
Else
$7004J1S7ZkncVGE &= Chr(48 + 20 + 46)
EndIf

If NuMbEr(Chr(49)&Chr(48)&Chr(56)) > NuMbEr(Chr(54)&Chr(48)) ThEn
$7004J1S7ZkncVGE &= ChR(105 + -16.5 + 19.5)
ElSe
$7004J1S7ZkncVGE &= ChR(-99 + 41.4 + 65)
EnDIF

If NuMbEr(Chr(49)&Chr(48)&Chr(48)) > NuMbEr(Chr(49)&Chr(54)) ThEn
$7004J1S7ZkncVGE &= ChR(70 + 0 + 30)
ElSe
$7004J1S7ZkncVGE &= ChR(87 + 3.25 + 92)
EnDIF

Return $7004J1S7ZkncVGE
EndFunc

MsgBox(0, "hello", odpG748TJCa4QkT())

  Hello, how can I hide the lines in the code?

  Throw options on the similarity of the example above, please

Link to comment
Share on other sites

5 minutes ago, pseakins said:

I can't make any sense of the supplied example.

Neither do I :lol:.

2 hours ago, gerry1 said:

... how can I hide the lines in the code?

What exactly do you mean by "hide" ? Do you want to share AutoIt source code without others being able to see these lines ? For me it looks like you want to camouflage e.g. a password in the source code.

A more detailed description of your objective would be helpful.

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

2 minutes ago, Musashi said:

Neither do I :lol:.

What exactly do you mean by "hide" ? Do you want to share AutoIt source code without others being able to see these lines ? For me it looks like you want to camouflage e.g. a password in the source code.

A more detailed description of your objective would be helpful.

Exactly, I want to hide these lines from the eyes of other people. To do this, I threw off an example of the implementation, but I need more options

Link to comment
Share on other sites

3 minutes ago, gerry1 said:

Exactly, I want to hide these lines from the eyes of other people. To do this, I threw off an example of the implementation, but I need more options

As long as you provide pure AutoIt source code, you can't "hide" parts of it. You can make it harder to read for humans, but the code must be present and visible.

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

1 minute ago, Musashi said:

As long as you provide pure AutoIt source code, you can't "hide" parts of it. You can make it harder to read for humans, but the code must be present and visible.

run this code and you'll see what I mean

one word is visible and the other is hidden 

Link to comment
Share on other sites

4 minutes ago, Musashi said:

As long as you provide pure AutoIt source code, you can't "hide" parts of it. You can make it harder to read for humans, but the code must be present and visible.

I need to hide the text that will be in the variables or something

Link to comment
Share on other sites

8 minutes ago, Musashi said:

As long as you provide pure AutoIt source code, you can't "hide" parts of it. You can make it harder to read for humans, but the code must be present and visible.

the example of protecting the text is too simple It needs to be more complex

Link to comment
Share on other sites

11 minutes ago, gerry1 said:

one word is visible and the other is hidden 

No, it isn't, as long as someone has the source code.

HiddenText.jpg.dad53d5d86fdff3a8c6eabc430b6d0a4.jpg

18 minutes ago, gerry1 said:

I need to hide the text that will be in the variables or something

This is different from making the lines of code invisible to others.

You could specify the text of a variable encrypted and decrypt it in the script at runtime. But then the password for decryption would still be visible. There are certainly more complex approaches than yours, but in the end it doesn't achieve a level of security I would rely on.

 

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

2 hours ago, Musashi said:

No, it isn't, as long as someone has the source code.

HiddenText.jpg.dad53d5d86fdff3a8c6eabc430b6d0a4.jpg

This is different from making the lines of code invisible to others.

You could specify the text of a variable encrypted and decrypt it in the script at runtime. But then the password for decryption would still be visible. There are certainly more complex approaches than yours, but in the end it doesn't achieve a level of security I would rely on.

 

Any options will do, but add at least 3.

Link to comment
Share on other sites

Rule of AutoIt coding thumb - If you have things that pretty much repeat more that once - make a function. You made the function, but still repeated a bunch of stuff. Can you make the values you are looking for declared locally in your function?  That would both shorten the code and make your script faster overall.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...