Hack Forums
[Source] Easy AutoIT junk-code generator - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Coders Lounge (https://hackforums.net/forumdisplay.php?fid=5)
+---- Thread: [Source] Easy AutoIT junk-code generator (/showthread.php?tid=3969722)



[Source] Easy AutoIT junk-code generator - Razοr - Jan 2, 2014

Hey guys i made this easy junk-code generator a while ago.
It isn't perfect, but it doesn't leave any patterns besides the way it builds the lines, with a little work this last pattern can be terminated if needed.

Code
;START OF CONFIG
$target = 20000            ;number of lines
$file = "junk.txt"        ;file to store in
$numlines = 10            ;number of temporary lines, 10 works p good
;END OF CONFIG

FileDelete($file) ;just in case it exists already, we don't want to waste our time!

Dim $lines[$numlines + 1] ;first we create the array
$lines[0] = $numlines ;this isn't really needed but i love my arrays like that.
_dimlines($numlines) ;dim the temporary lines for the first time
FileWrite($file, "") ;create the file
$i = 0 ;set an int to count our loop / the lines created
$stept = Random(20,30,1) ;after this the lines will get redimed in order to leave no pattern
Do ;start of a do loop
    If $i = $stept Then ;With this we count to the next redim
        $stept = $stept + Random($i + 20, $i + 30,1) ;and if it happens we set a new point for it (p random to leave no pattern again)
        _dimlines($numlines) ;and redim all lines
    EndIf ;End of that part!
    $i = $i + 1 ;line count variable + 1
    $rand = Random(1,10,1) ; create a random number
    FileWriteLine($file, $lines[$rand]) ;and write one of the the temp lines to the file
    $per = $i / $target * 100 ;calculate the %
    ToolTip($i & "/" & $target & " lines created - That's " & $per & "%");and display a nice message for the user
Until $i = $target ;we do that until we reached the number of lines we want

Func _dimlines($dtarget) ;this is the func to dim/redim the the lines
$d = 1 ;a new int for the loop below
Do ;a do loop again :o
    $lines[$d] =  "$" & Random(50000,150000,1) & ' = "' & Random(50000,150000,1) & '"' ;That is how a line gets generate only 2 random numbers + the operators
    $d = $d + 1 ;$d++
Until $d = $dtarget ;the loop does it for any temp line
EndFunc ;end of the func
As we do not have syntax highlighting for AutoIT yet, here is a screenshot:
[img]http://speedcap.net/sharing/files/94/68/946850fb3e228951b2aebfbdd3918f18.png[/img]

🤝 Razor


* - labbepierre - Jan 14, 2014

Thank you Razor for your generator.


* - ๖ۣۜXilluX - Feb 5, 2014

Is this the way you make your RazorCrypt stub FUD ? :D


* - Emoticon - Feb 5, 2014

(Feb 5, 2014 08:00 AM)๖ۣۜXilluX Wrote:  Is this the way you make your RazorCrypt stub FUD ? :D

Hahaha I think that was the best reply anyone could ever have to this.

@OP Nice, good for learning how AutoIT works, just looking at the source.


* - Razοr - Feb 5, 2014

(Feb 5, 2014 08:00 AM)๖ۣۜXilluX Wrote:  Is this the way you make your RazorCrypt stub FUD ? :D
Very funny.
Last time i contributed. 🤝


* - ๖ۣۜXilluX - Feb 7, 2014

Just kidding mate, don´t take it too serious! :)


* - archy-one - Feb 19, 2014

I'm not a fan of junkcode but it's a great share..Thanks Razor.


* - Viloresi - Mar 11, 2014

nice one really good job razor, this is a cool and short easy one


* - digordi - Apr 5, 2014

thanks you, really appreciate sharing this with us