BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

A call for obfuscated LabVIEW code

No, I think it's all klingon.
___________________________________________________________________
Still confused after 8 years.
Message 61 of 85
(17,968 Views)
Allthough this is a bit old thread, it's the breakpoint and a big thread, so anyone in need for obfuscating code will have a look through. That's why I link that thread:

Why does LabVIEW allow me to have 2 controls with same name

So, while you use Caption for your FP, you can have a consistent equal label name for all your controls 😉

Felix
Message 62 of 85
(17,811 Views)

Felix!

That idea is border-line cruel!

Ben

Smiley Very Happy

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 63 of 85
(17,782 Views)
 I really give up. Can someone explain this (HelloWorldJP.vi) to me please?
0 Kudos
Message 64 of 85
(17,164 Views)

The key is in understanding how the type cast works and how LabVIEW represents a boolean.

 

  • A type cast takes a bit pattern in memory (let's say you have an 8 bit integer whose value is 00110101) and rereads it as the new data type (in this case a string with the value 53, or "5").
  • A boolean is represented as a whole byte. If any of the bits is true, then the boolean is true. In this case, taking the string "Hello World!" and typecasting it to a boolean array results in an array of 12 bytes, which can then be saved as a constant.

 

You can see this if you look at the actual bits:

 


___________________
Try to take over the world!
Message 65 of 85
(17,160 Views)

LAVA has a thread on Obfuse code that can be found here.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 66 of 85
(16,083 Views)

What confuses me about JP's code is this:

If you look at the constant, they're all 'T'.

When you press run, it says Hello World.

 

If you change 1 of the booleans to F, then back to T,

it no longer says Hello World.

 

Why is this?

Cory K
0 Kudos
Message 67 of 85
(15,964 Views)

Did you read tst's explanation above?

 

Basically, the boolean array was generated by typecasting the desired string to a boolean array. Once you toggle a boolean, the value will get "normalized" and thus the extra information is lost.

Message Edited by altenbach on 05-22-2009 07:57 PM
Message 68 of 85
(15,957 Views)

Ok I am really REALLY late to this thread.

 

 

=====================
LabVIEW 2012


0 Kudos
Message 69 of 85
(14,039 Views)

@Steve Chandler wrote:

Ok I am really REALLY late to this thread.


Running it locked up my computer completely. 😞

0 Kudos
Message 70 of 85
(14,014 Views)