Having a problem with Automagic

Post your questions and help other users.

Moderator: Martin

User avatar
husky
Posts: 132
Joined: 29 Oct 2016 13:41
Location: Omaha, Nebraska, USA
Contact:

Re: Having a problem with Automagic

Post by husky » 22 Mar 2018 20:53

Hi there Desmanto,

I'm still customizing my new PC.
I got so much garbage that I need to sort out and what to keep and what to discard, and I have stuff from 2005 in my backups.
At least now I have 2 TB do screw up again instead of just some Gigabytes.

All in all I hope finish the customization by the end of this week.
As of the defunct laptop, I think better leave it in the coffin for now. Just paid a lot for the new PC and right now no economic advantage to resuscitate it. Perhaps later on.
Good to now automagic know about the problem I'm runing into. Automagic has more important things to worry about. I'm placing the issue in the back burner for now.
Will try the document clean up after finishing my customization. One problem at a time.

I was doing some work in order to calculate entropy, password strength and how long it would take to break it using brute-force.
Just found out that automagic doesn't provide logatithm function for the calculations I need. Bummer.

See ya soon

Husky
"Basic research is what I'm doing when I don't know what I'm doing"

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Having a problem with Automagic

Post by Desmanto » 23 Mar 2018 15:30

Yeah, sunk cost, not worth the time to fix it anymore. Just salvage whatever left.

Automagic is for automation, so what we expect. There are some experimental functions, for RSA and Diffie Hellman. Look at help menu for script examples. I wonder if that can help.

As long as the basic calculation is still based on common math function, you can always recreate the calculation. Or maybe use java for some unavailable function.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
husky
Posts: 132
Joined: 29 Oct 2016 13:41
Location: Omaha, Nebraska, USA
Contact:

Re: Having a problem with Automagic

Post by husky » 24 Mar 2018 02:37

Hummm.. :o

Use Java? How do you use Java inside automagic? Is it possible at all?
I tried Math.log but to no avail.


I'm VERY curious.


Regards

Husky
"Basic research is what I'm doing when I don't know what I'm doing"

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Having a problem with Automagic

Post by Desmanto » 24 Mar 2018 04:28

Oh, yeah, we don't have math.log. The log() is to log the variable to Automagic logging system.

To use java, use callJavaStaticMethod(). At script, tap at the function, filter java, choose one of the function you need, find the class name and method (and object) you need. For example, to calculate the log2 of 16.

Code: Select all

x = callJavaStaticMethod("java.lang.Math", "log(double)", 16)  / callJavaStaticMethod("java.lang.Math", "log(double)", 2)
x = 4.0
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
husky
Posts: 132
Joined: 29 Oct 2016 13:41
Location: Omaha, Nebraska, USA
Contact:

Re: Having a problem with Automagic

Post by husky » 24 Mar 2018 10:22

Desmanto,

You are a GENIUS!!!!

Excellent news.

I can start my small flow to calculate password strength.
Perhaps I'll try to post the flow in the forum once it proves valid.

Thanks Again.

Husky
"Basic research is what I'm doing when I don't know what I'm doing"

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Having a problem with Automagic

Post by Martin » 25 Mar 2018 19:45

Btw: I'll add two new functions log10 (base 10) and ln (base e) to the next EAP version so it should be much easier to calculate logarithms.

Regards,
Martin

User avatar
husky
Posts: 132
Joined: 29 Oct 2016 13:41
Location: Omaha, Nebraska, USA
Contact:

Re: Having a problem with Automagic

Post by husky » 30 Mar 2018 13:40

Martin,

GREAT !!!!

Thanks for the extra work. :D :D :D :D
BTW, here's something I read today.
You might be interested as well as @Desmanto or you already know about it.

https://www.techrepublic.com/article/un ... 7071993943

To check for certification: Google Play app --> Settings ---> Certification (at the bottom of the screen).

Best Regards

Husky
"Basic research is what I'm doing when I don't know what I'm doing"

Post Reply