Jump to content

Obfuscator random function


Glyph
 Share

Recommended Posts

Func randochar()
    $wee = Random(1, 2, 1)
    Return Execute("_" & $wee & "()")
EndFunc   ;==>randochar

Func _1()
    ;number 0-9
    $ran = Chr(Random(48, 57, 1))
    Return $ran
EndFunc   ;==>_1

Func _2()
    ;letter a-f
    $ran = Chr(Random(65, 70, 1))
    Return $ran
EndFunc   ;==>_2

This works perfectly fine, but i tried to use obfuscator, and because it's an execute function it won't work being obfuscated....

Anyone have any workarounds??

this code was made by me thinkign the obfuscator might work with execute function...

tolle indicium

Link to comment
Share on other sites

Func randochar()
    Switch Random(1, 2, 1)
        Case 1
            return _1();
        Case 2
            return _2();
    EndSwitch
EndFunc ;==>randochar

Func _1()
  ;number 0-9
    $ran = Chr(Random(48, 57, 1))
    Return $ran
EndFunc ;==>_1

Func _2()
  ;letter a-f
    $ran = Chr(Random(65, 70, 1))
    Return $ran
EndFunc ;==>_2

Edited by KentonBomb
Link to comment
Share on other sites

didn't even think to use a switch!

very clever, thank you!

Or you can go ninja like this:

Func randochar()
    Switch Random(1, 2, 1)
        Case 1
            $ran = Chr(Random(48, 57, 1))
            Return $ran
        Case 2
            $ran = Chr(Random(65, 70, 1))
            Return $ran
    EndSwitch
EndFunc   ;==>randochar

;)

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...