Page 3 of 4 <1234>
Topic Options
#203707 - 2011-11-14 10:19 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Allen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
45, oh...
_________________________
!

download KiXnet

Top
#203708 - 2011-11-14 10:24 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
all of them? really?
wonder what makes all of the codes fail...
_________________________
!

download KiXnet

Top
#203709 - 2011-11-14 10:29 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
Really? Hang on...
Top
#203710 - 2011-11-14 10:29 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so...
what is the difference with 44 and 45?
they look just the same to me and the other one fails and other one works.

edit,
the tests are wrong!
and I thought my code would fail \:D


Edited by Lonkero (2011-11-14 10:30 PM)
_________________________
!

download KiXnet

Top
#203711 - 2011-11-14 10:32 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
44 key = space
45 key = tab

I need to go out for about an hour. When I get back I will verify the tests. Don't change your code yet.

Sorry for the confusion.

Top
#203712 - 2011-11-14 10:37 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Allen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
please do, I did a printout routine in my code and got key asc() of 32 from both.
_________________________
!

download KiXnet

Top
#203713 - 2011-11-14 11:22 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Perfect Chaos \:o
Me likes
_________________________



Top
#203714 - 2011-11-14 11:23 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Jochen]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
Updated INI... http://www.kixtart.org/forums/ubbthreads.php?ubb=download&Number=252

The keys with the Tab got screwed. Chaos avoided.



Edited by Allen (2011-11-14 11:29 PM)

Top
#203715 - 2011-11-14 11:34 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Allen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I do accept the new ini \:\)
 Code:
KiXtart Version  = 4.61
KiXGolf Script   = kixgolf_wo.kix
Scoring Engine   = 3.3
OS               = Windows 7 Professional Edition
CPU              = Intel Pentium III
Speed            = 1396 MHz
Memory           = 4096 MB

Tournament       = Whitespace Obfuscation
Processing Start = 2011/11/15 00:33:29.010
Processing End   = 2011/11/15 00:33:30.236
Duration         = 0000/00/00 00:00:01.226
# Tests Run      = 46
# Tests Passed   = 46
# Tests Failed   = 0
Result           = Passed
KiXGolf Score    = 173
_________________________
!

download KiXnet

Top
#203716 - 2011-11-14 11:51 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ok, Jochen, should we go about fixing your code now? \:\)
_________________________
!

download KiXnet

Top
#203718 - 2011-11-15 08:45 AM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
mornin dudes
will download and check soon if time allows. Damn work all day ;\)
_________________________



Top
#203719 - 2011-11-15 01:24 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
My code did work. I was fussing with it near the end trying to cut more. I must have not reverted it back before posting. Please except my apologies. I will locate the working and post it shortly.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#203720 - 2011-11-15 01:25 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
You are usingan older version of KiXtart. Trying using 4.62.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#203721 - 2011-11-15 01:45 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Howard Bullock]
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I must have introduced a non-printable character into the code somehow. I re-copied the code form his post and re-edited it.
 Code:
function a($, optional $k,$e,$m)
    $k=$k+$<' '
    $m=' ','	'
    $e=$<!
    while $
        dim $c,$n,$x
        $x=asc($)
        $n=128
        while $n
            $c=$c+iif($e,$n*(($k^$<' ')&$>),$m[$k^$x/$n])
            $x=$x-$n*($x/$n)
            $n=$n/2
            $=iif($e|$n=0,right($,~),$)
        loop
        $a=$a+iif($e,chr($c),$c+iif($,@,$m[$k]))
endfunction 


 Code:
KiXtart Version  = 4.62
KiXGolf Script   = kixgolf_wo.kix
Scoring Engine   = 3.3
OS               = Windows 7 Professional Edition
CPU              = Intel Pentium Celeron
Speed            = 2394 MHz
Memory           = 4096 MB

Tournament       = Whitespace Obfuscation
Processing Start = 2011/11/15 07:32:13.205
Processing End   = 2011/11/15 07:32:13.423
Duration         = 0000/00/00 00:00:00.217
# Tests Run      = 40
# Tests Passed   = 40
# Tests Failed   = 0
Result           = Passed
KiXGolf Score    = 245

Thank you for participating in KiXtart Golf! 


As for my code, it is now repaired. I used my editor to change TABS to spaces for better formatting. That alters the TAB I used in the code as well. Sorry for the error.
 Code:
function a($s, optional $k,$,$c,$e,$p,$z)
  $z=1,128,64,32,16,8,4,2,1
  For $c=1 To ($s^)
    $p=substr($s,$c,1)
    if $k
      ;Encode
      For $=1 to 8
        $a=$a+iif(asc($p) & $z[$], iif($k=" ","	"," "), $k)
      Next
    else
      ;Decode
      $=$c mod 8
      $e=$z[$]*(right($s,1)<>$p)+$e
      if $=0
        $a=$a+chr($e)
        $e=0
      endif
    endif
  Next
  $a=$a+$k
endfunction 

 Code:
KiXtart Version  = 4.62
KiXGolf Script   = kixgolf_wo.kix
Scoring Engine   = 3.3
OS               = Windows 7 Professional Edition
CPU              = Intel Pentium Celeron
Speed            = 2394 MHz
Memory           = 4096 MB

Tournament       = Whitespace Obfuscation
Processing Start = 2011/11/15 07:44:24.959
Processing End   = 2011/11/15 07:44:25.099
Duration         = 0000/00/00 00:00:00.139
# Tests Run      = 40
# Tests Passed   = 40
# Tests Failed   = 0
Result           = Passed
KiXGolf Score    = 255

Thank you for participating in KiXtart Golf! 
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#203722 - 2011-11-15 01:55 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Howard Bullock]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yea, found that out. golfed your code already as well.
I guess you ended up working on jochen's cause the rest of the guys haven't posted their codes yet \:\)
_________________________
!

download KiXnet

Top
#203725 - 2011-11-15 08:29 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
Well my 500ish code doesn't work anymore with the new cases, and i don't really have the time to work on it. but i can post it anyways. I doubt there is anything in it of value though.

 Code:
function a($, optional $k,$b,$x,$z)
   if asc($)=32 or asc($)=9
      $k = right($,1)
      $ = Replace($,$k,0)
      $x = iif($k='	',' ','	')
      $ = Replace($,$x,1)+$k
      for $x=0 to len($)/8
         $b=$b+' '+substr($,$x*8+1,8)
      next
      for each $x in Split($b)
         $b = 128
         $=0
         for $z=1 to 8
            $ = $+$b*substr($x,$z,1)
            $b = $b/2
         next
         $a = $a+Chr($)
      next
   else
      $b = asc($)
      for $x=1 to len($)-1
         $b=''+$b+' '+asc(right($,-$x))
      next
      for each $x in Split($b)
         $ = 128
         for $z=1 to 8
            if $<=$x
               $a = $a+"1"
               $x = 0+$x-$
            else
               $a = $a+"0"
            endif
            $ = $/2
         next
      next
      $a = Replace($a,0,$k)
      $ = iif($k="	"," ","	")
      $a = Replace($a,1,$)+$k
endfunction

Top
#203726 - 2011-11-15 08:31 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: ShaneEP]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
to be accepted for a score in private, a posting is needed in public...
so, there is that value. and you may have some trick that we forgot in your sleeve ;\)
_________________________
!

download KiXnet

Top
#203727 - 2011-11-15 08:35 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
Seems like adding if $k and swapping the sections in your original if should fix it. Maybe?
Top
#203728 - 2011-11-15 08:47 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I see you turned it to an array and then used for each.
substr() would have got you there without the need for that and with ~100 strikes shorter...

anyways, your code fixed and shorther, 489 -> 475
 Code:
function a($, optional $k,$b,$x,$z)
;   if asc($)=32 or asc($)=9
if not $k
      $k = right($,1)
      $ = Replace($,$k,0)
      $x = iif($k='	',' ','	')
      $ = Replace($,$x,1)+$k
      for $x=0 to len($)/8
         $b=$b+' '+substr($,$x*8+1,8)
      next
      for each $x in Split($b)
         $b = 128
         $=0
         for $z=1 to 8
            $ = $+$b*substr($x,$z,1)
            $b = $b/2
         next
         $a = $a+Chr($)
      next
   else
      $b = asc($)
      for $x=1 to len($)-1
         $b=''+$b+' '+asc(right($,-$x))
      next
      for each $x in Split($b)
         $ = 128
         for $z=1 to 8
            if $<=$x
               $a = $a+"1"
               $x = 0+$x-$
            else
               $a = $a+"0"
            endif
            $ = $/2
         next
      next
      $a = Replace($a,0,$k)
      $ = iif($k="	"," ","	")
      $a = Replace($a,1,$)+$k
endfunction
_________________________
!

download KiXnet

Top
#203729 - 2011-11-15 08:48 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
ok... we still missing Eric, right?
_________________________
!

download KiXnet

Top
Page 3 of 4 <1234>


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 466 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.076 seconds in which 0.026 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org