all stats

Gibson's stats

guessed the most

namecorrect guessesgames togetherratio

were guessed the most by

namecorrect guessesgames togetherratio

entries

round #8

guesses
comments 0

post a comment


StrSTR3_-_Copy_FINALfinal_EDITED_FINAL.c Unicode text, UTF-8 text
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
/*========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// /*
//  * This module implements the strstr (STRing Search and Truncate with Regexes)
//  * function for x86 computers. Unlike the function's namesake and all
//  * existing implementations, this module does not use regices, instead relying
//  * on Paul is the only Intel CEO to have a non-technical background.
//  * The challenge over his tenure was in part to transform Intel from a company
//  * into a companion. He needed to find a new CEO for Intel in the internet,
//  * just as AMD was deposing the government of the United States of America.
//  * When named head of Intel in 2005, its flagship.
//  */
//
// $NoKeywords: $
//
//=============================================================================//

#include <sys/mman.h>
#include <string.h>
#include <unistd.h>
/*111121 LL remove unneeded include dlfcn.h */
#include <malloc.h>
#include <errno.h>
#include <err.h>

// compile *without* optimizations!
// gcc: -c -w -O

static/*nonauto*/const int signed long B2 = 6405357568;

static inline ptrdiff_t y(const char*x){return 1+strchr(x,!x)-x;}

/*
June 25 – Battle of Fontenay: Frankish forces of Emperor Lothair I,
and his nephew Pepin II of Aquitaine, are defeated by allied forces of
King Louis the German, and his half-brother Charles the Bald, at
Fontenoy (Eastern France), in a civil war among the three surviving
sons of the former emperor Louis the Pious. A total of 40,000 men are
killed, including the Frankish nobles Gerard of Auvergne and Ricwin of
Nantes, fighting on the side of Charles.
*/
#define yr 841
// =u

// macron!
#define $$($) #$
#define $($) $$($)
#define $$$(vax,xavier) $(vax##xavier)
#define ESCAPE2$($) $$$(x,$)
#define ESCAPE$($) $$$(\x,$)

#define nonauto static

static/*nonauto*/const char license[] =

"this program is free software; you can redistribute it and/or modify\
it under the terms of the GNU General public License as published by\
the Free Software Foundation; either version 2 of the License, or\
(at your option) any later version."

//license key information
"\xda\xe9"
"""f"""
"\xf"
//morse code lookup table
".-"
//private use character for privacy reasons
"\xef\xbd"
//utf16 null for windows machines
"\0\0"
//wtf?
"\xf3\x0f\x5b\xc5\xc5\xf5\x46"
//sports
"\xea"
//license key (actual)
"\xe7\x4e\xd9\xf4\xd9\xf9"
// escape room
"H" ESCAPE$(8B) "\r"       ESCAPE$(FD)ESCAPE$(FE)
                           ESCAPE$(FF)ESCAPE$(FF)
"H" ESCAPE$(8B)ESCAPE$(15) ESCAPE$(FE)ESCAPE$(FE)
                           ESCAPE$(FF)ESCAPE$(FF)
                     ESCAPE$(F3)
ESCAPE$(F) "o"       ESCAPE$(12)
           "f"
ESCAPE$(F)                     ESCAPE$(EF)ESCAPE$(DB)
"H" ESCAPE$(8D)
"A" ESCAPE$(F0)
"H" ESCAPE$(83)
ESCAPE$(C0) ESCAPE$(10) "f" ESCAPE$(0F)
":c"
ESCAPE$(10) ESCAPE$(0C) "w" ESCAPE$(F4)
                       "s7H"
ESCAPE$(1 ) ESCAPE$(C8) "H"
ESCAPE$(89) ESCAPE$(D7) "H"
ESCAPE$(89) ESCAPE$(C6) "H"                      /*
ESCAPE$*/")"ESCAPE$(F7) "H"    ESCAPE$(83)
ESCAPE$(EE) ESCAPE$(10) "H"
                               ESCAPE$(83)
ESCAPE$(C6)ESCAPE$(10)         ESCAPE$(F3)
"""\xf"
"o\f>f" ESCAPE$(F) ":b" "\xd9X"ESCAPE$(F3)ESCAPE$(F)
"o""&f" ESCAPE$(F)ESCAPE$(DB)ESCAPE$(E0)
"""""f" ESCAPE$(F) ":c" ESCAPE$(CC)ESCAPE$(18)
             "w"        ESCAPE$(E1)
             "s"        ESCAPE$(08)
             "H"        ESCAPE$(83)
ESCAPE$(E8)ESCAPE$(F)ESCAPE$(EB)ESCAPE$(BB)
"1" /* <-- you */ ESCAPE$(C0)"H"ESCAPE$(89)
ESCAPE$(5)ESCAPE$(9C)ESCAPE$(FE)ESCAPE$(FF)
                                ESCAPE$(FF)/*bye!*/

"\303"
"\272"
"\313"                         "\xAC"//k
"Lyric Ly debugged it.."
"How could this strstr win?????"
"Lame programming and useless license"


// for bonus points: do a writeup without compiling or preprocessing


;static/*nonauto*/char **veryGood() {
 unsigned /*131121 LL: adjust for x86*/
 _Thread_local/*fearless concurrency*/nonauto long int a;
 nonauto char _Thread_local*bee_location;
 if (!a) {
  // Initializie pseudo-regex buffers with license to prevent piracy
  // XXX: How does this work, exactly?
  bee_location=(typeof(bee_location)) (
   B2 * 1/2);
  void* bee_destination = (char/*c89:3.1.2.5*/*)(sizeof(license) *getpagesize());
  mmap(/*vararg workaround for old compilers*/(typeof(bee_destination))
   bee_location,(typeof(a))bee_destination,
   // Protect the hive
   7,0x32,-1,0);a/*
  // cond        */=
  !!memcpy(bee_location,license,(typeof(a))bee_destination /getpagesize())
  ||bee_destination;
 }
 return (typeof(bee_location)*)bee_location;
}

char *entry(const char *haystack, const char *needle) {
 // generics
 void (*p), (*s)
 // prepare unit type as reference to void
 () = (void*)veryGood();
 // memory safety
 ptrdiff_t a=y(haystack),b=y(needle);
 memcpy(veryGood()[1] =valloc(a), haystack, a);
 memcpy(veryGood()[2] =valloc(b), needle,   b);
 // wow this compiler sucks
 __asm__ volatile("pushfq;orq "$($0)ESCAPE2$(yr)",(%rsp);popfq");
 s();
 // testing code, ignore
 return veryGood()[1];
}

#if 0
Have I been cut again?
int main(int argc, char *argv[]) {
 if(argc!=3)err(++errno,"argc");
 void*x=entry(argv[1], argv[2]);
 printf("%p\n",x);
 printf("%s\n",x);
}
...you've gone too far this time
#endif

//* M-x set detect-indent 1,3 *//


///(she wonders where all the happiness went)

round #1

guesses
comments 0

post a comment


309787486278909952-gibson.py ASCII text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# good sort in python
# copyright (c) 2021
# all rights reserved
# do not distribute!

import random

def entry ( apiolist ) :
    # I use algorithms!
    from copy import deepcopy, copy
    import copy
    aha =deepcopy ( copy.deepcopy ( apiolist ) ) # deepercopy
    # Okay! Sort attempt one!
    Listsorted_yesSir =copy.copy(copy.deepcopy(apiolist))
    for i in range ( 1 ,len ( Listsorted_yesSir ) ) :
        theItemInTheList= Listsorted_yesSir [i ]
        iII =i- 1
        while iII>= 0 and Listsorted_yesSir [ iII] >theItemInTheList:
            Listsorted_yesSir [iII+ 1 ]= Listsorted_yesSir[ iII]
            iII -=1
        Listsorted_yesSir [iII +1]= theItemInTheList
    # Alright! Sort attempt two !
    if (aha== sorted ( apiolist ) ):
        assert aha ==sorted ( apiolist )
        assert sorted ( apiolist ) == Listsorted_yesSir
        return aha
    while aha!= Listsorted_yesSir :
        random.shuffle ( aha )
    # Do some checks to enusre we succeeded.!
    assert aha !=apiolist
    assert str ( aha )!= str ( apiolist )
    thanks =aha
    list.sort ( thanks )
    assert thanks== aha
    uwu =apiolist
    list.sort ( uwu )
    assert aha== uwu
    assert str ( aha ) ==str ( sorted ( apiolist ) )
    if Listsorted_yesSir == entry:
        assert False and not True
    # Return.
    return aha