Skip to main content
Post Undeleted by Doorknob
Post Deleted by user16991
added 47 characters in body
Source Link
user16991
user16991

(vintage) C - 88

No need for all these silly dedicated golfing languages. Better go back to the good old days, before the quiche eaters and their "program = algorithm+data" nonsense ruined all the fun.

The code is a C function, stored as a string.
It returns the binary value as an integer.

Run it in DosBox with Borland Turbo C 2.0.
There are no control characters in the string, so a copy-paste should work.
Compile with tiny memory model or else...

typedef int (* pfun)();
main ()
{
    pfun passwd = (pfun) "¬< sûŠDþ,#ÃEq{1Kt:=qQ+ƒ.?&m):|YH)†P$Pzs/7Tk,2o0&(CƒzIzB-E+\l^Dk‚sw.'..Hjp~T8WSN.pWc&,8Idhwƒq*jsq&„";

    printf ("password %d\n", passwd());
}

If you disassemble the start of the string, you'll see something like:

scan: lodsb
      cmp al,32
      jae scan
      mov al,[si-2]
      sub al, 35
      ret

since si is used as function address, it points directly to the code, followed by the passwords.

All values are shifted by 35 to avoid escaping control characters and double quotes.

The code is 11 bytes long, so it will work up to 12 characters.

Unfortunately, the 11th value (34) is too low to produce a valid password with an increased shift value (ret opcode is 195, so you would need a shift of 161, and the maximal shift to avoid a rollover is 255-99=156).

11 characters will produce a wrong value, and your virtual PC will likely crashexperience severe (and usually lethal) undefined behaviours with 10 characters or less.

(vintage) C - 88

No need for all these silly dedicated golfing languages. Better go back to the good old days, before the quiche eaters and their "program = algorithm+data" nonsense ruined all the fun.

The code is a C function, stored as a string.
It returns the binary value as an integer.

Run it in DosBox with Borland Turbo C 2.0.
There are no control characters in the string, so a copy-paste should work.
Compile with tiny memory model or else...

typedef int (* pfun)();
main ()
{
    pfun passwd = (pfun) "¬< sûŠDþ,#ÃEq{1Kt:=qQ+ƒ.?&m):|YH)†P$Pzs/7Tk,2o0&(CƒzIzB-E+\l^Dk‚sw.'..Hjp~T8WSN.pWc&,8Idhwƒq*jsq&„";

    printf ("password %d\n", passwd());
}

If you disassemble the start of the string, you'll see something like:

scan: lodsb
      cmp al,32
      jae scan
      mov al,[si-2]
      sub al, 35
      ret

since si is used as function address, it points directly to the code, followed by the passwords.

All values are shifted by 35 to avoid escaping control characters and double quotes.

The code is 11 bytes long, so it will work up to 12 characters.

Unfortunately, the 11th value (34) is too low to produce a valid password with an increased shift value (ret opcode is 195, so you would need a shift of 161, and the maximal shift to avoid a rollover is 255-99=156).

11 characters will produce a wrong value, and your virtual PC will likely crash with 10 characters or less.

(vintage) C - 88

No need for all these silly dedicated golfing languages. Better go back to the good old days, before the quiche eaters and their "program = algorithm+data" nonsense ruined all the fun.

The code is a C function, stored as a string.
It returns the binary value as an integer.

Run it in DosBox with Borland Turbo C 2.0.
There are no control characters in the string, so a copy-paste should work.
Compile with tiny memory model or else...

typedef int (* pfun)();
main ()
{
    pfun passwd = (pfun) "¬< sûŠDþ,#ÃEq{1Kt:=qQ+ƒ.?&m):|YH)†P$Pzs/7Tk,2o0&(CƒzIzB-E+\l^Dk‚sw.'..Hjp~T8WSN.pWc&,8Idhwƒq*jsq&„";

    printf ("password %d\n", passwd());
}

If you disassemble the start of the string, you'll see something like:

scan: lodsb
      cmp al,32
      jae scan
      mov al,[si-2]
      sub al, 35
      ret

since si is used as function address, it points directly to the code, followed by the passwords.

All values are shifted by 35 to avoid escaping control characters and double quotes.

The code is 11 bytes long, so it will work up to 12 characters.

Unfortunately, the 11th value (34) is too low to produce a valid password with an increased shift value (ret opcode is 195, so you would need a shift of 161, and the maximal shift to avoid a rollover is 255-99=156).

11 characters will produce a wrong value, and your virtual PC will experience severe (and usually lethal) undefined behaviours with 10 characters or less.

edited body
Source Link
user16991
user16991

(vintage) C - 88

No need for all these silly dedicated golfing languages. Better go back to the good old days, before the quiche eaters and their "program = algorithm+data" nonsense ruined all the fun.

The code is a C function, stored as a string.
It returns the binary value as an integer.

Run it in DosBox with Borland Turbo C 2.0.
There are no control characters in the string, so a copy-paste should work.
Compile with tiny memory model or else...

typedef int (* pfun)();
main ()
{
    pfun passwd = (pfun) "¬< sûŠDþ,#ÃEq{1Kt:=qQ+ƒ.?&m):|YH)†P$Pzs/7Tk,2o0&(CƒzIzB-E+\l^Dk‚sw.'..Hjp~T8WSN.pWc&,8Idhwƒq*jsq&„";

    printf ("password %d\n", passwd());
}

If you disassemble the start of the string, you'll see something like:

scan: lodsb
      cmp al,32
      jae scan
      mov al,[si-2]
      sub al, 35
      ret

since si is used as function address, it points directly to the code, followed by the passwords.

All values are shifted by 35 to avoid escaping control characters and double quotes.

The code is 11 bytes long, so it will work up to 12 characters.

Unfortunately, the 11th value (34) is too low to produce a valid password with an increased shift value (ret opcode is 195, so you would need a shift of 161, and the maximal shift to avoid a rollover is 255-99=156).

11 characters will produce a wrong value, and your virtual PC will likely crash with 10 characters or less.

(vintage) C - 88

The code is a C function, stored as a string.
It returns the binary value as an integer.

Run it in DosBox with Borland Turbo C 2.0.
There are no control characters in the string, so a copy-paste should work.
Compile with tiny memory model or else...

typedef int (* pfun)();
main ()
{
    pfun passwd = (pfun) "¬< sûŠDþ,#ÃEq{1Kt:=qQ+ƒ.?&m):|YH)†P$Pzs/7Tk,2o0&(CƒzIzB-E+\l^Dk‚sw.'..Hjp~T8WSN.pWc&,8Idhwƒq*jsq&„";

    printf ("password %d\n", passwd());
}

If you disassemble the start of the string, you'll see something like:

scan: lodsb
      cmp al,32
      jae scan
      mov al,[si-2]
      sub al, 35
      ret

since si is used as function address, it points directly to the code, followed by the passwords.

All values are shifted by 35 to avoid escaping control characters and double quotes.

The code is 11 bytes long, so it will work up to 12 characters.

Unfortunately, the 11th value (34) is too low to produce a valid password with an increased shift value (ret opcode is 195, so you would need a shift of 161, and the maximal shift to avoid a rollover is 255-99=156).

11 characters will produce a wrong value, and your virtual PC will likely crash with 10 characters or less.

(vintage) C - 88

No need for all these silly dedicated golfing languages. Better go back to the good old days, before the quiche eaters and their "program = algorithm+data" nonsense ruined all the fun.

The code is a C function, stored as a string.
It returns the binary value as an integer.

Run it in DosBox with Borland Turbo C 2.0.
There are no control characters in the string, so a copy-paste should work.
Compile with tiny memory model or else...

typedef int (* pfun)();
main ()
{
    pfun passwd = (pfun) "¬< sûŠDþ,#ÃEq{1Kt:=qQ+ƒ.?&m):|YH)†P$Pzs/7Tk,2o0&(CƒzIzB-E+\l^Dk‚sw.'..Hjp~T8WSN.pWc&,8Idhwƒq*jsq&„";

    printf ("password %d\n", passwd());
}

If you disassemble the start of the string, you'll see something like:

scan: lodsb
      cmp al,32
      jae scan
      mov al,[si-2]
      sub al, 35
      ret

since si is used as function address, it points directly to the code, followed by the passwords.

All values are shifted by 35 to avoid escaping control characters and double quotes.

The code is 11 bytes long, so it will work up to 12 characters.

Unfortunately, the 11th value (34) is too low to produce a valid password with an increased shift value (ret opcode is 195, so you would need a shift of 161, and the maximal shift to avoid a rollover is 255-99=156).

11 characters will produce a wrong value, and your virtual PC will likely crash with 10 characters or less.

edited body
Source Link
user16991
user16991

(vintage) C - 8988

The code is a C function, stored as a string.
It returns the binary value as an integer.

Run it in DosBox with Borland Turbo C 2.0.
There are no control characters in the string, so a copy-paste should work.
Compile with tiny memory model or else...

typedef int (* pfun)();
main ()
{
    pfun passwd = (pfun) "¬< sûŠDþ,#ÃEq{1Kt:=qQ+ƒ.?&m):|YH)†P$Pzs/7Tk,2o0&(CƒzIzB-E+\l^Dk‚sw.'..Hjp~T8WSN.pWc&,8Idhwƒq*jsq&„";

    printf ("password %d\n", passwd());
}

If you disassemble the start of the string, you'll see something like:

scan: lodsb
      cmp al,32
      jae scan
      mov al,[si-2]
      sub al, 35
      ret

since si is used as function address, it points directly to the code, followed by the passwords.

All values are shifted by 35 to avoid escaping control characters and double quotes.

The code is 11 bytes long, so it will work up to 12 characters.

Unfortunately, the 11th value (34) is too low to produce a valid password with an increased shift value (ret opcode is 195, so you would need a shift of 161, and the maximal shift to avoid a rollover is 255-99=156).

11 characters will produce a wrong value, and your virtual PC will likely crash with 10 characters or less.

(vintage) C - 89

The code is a C function, stored as a string.
It returns the binary value as an integer.

Run it in DosBox with Borland Turbo C 2.0.
There are no control characters in the string, so a copy-paste should work.
Compile with tiny memory model or else...

typedef int (* pfun)();
main ()
{
    pfun passwd = (pfun) "¬< sûŠDþ,#ÃEq{1Kt:=qQ+ƒ.?&m):|YH)†P$Pzs/7Tk,2o0&(CƒzIzB-E+\l^Dk‚sw.'..Hjp~T8WSN.pWc&,8Idhwƒq*jsq&„";

    printf ("password %d\n", passwd());
}

If you disassemble the start of the string, you'll see something like:

scan: lodsb
      cmp al,32
      jae scan
      mov al,[si-2]
      sub al, 35
      ret

since si is used as function address, it points directly to the code, followed by the passwords.

All values are shifted by 35 to avoid escaping control characters and double quotes.

The code is 11 bytes long, so it will work up to 12 characters.

Unfortunately, the 11th value (34) is too low to produce a valid password with an increased shift value (ret opcode is 195, so you would need a shift of 161, and the maximal shift to avoid a rollover is 255-99=156).

11 characters will produce a wrong value, and your virtual PC will likely crash with 10 characters or less.

(vintage) C - 88

The code is a C function, stored as a string.
It returns the binary value as an integer.

Run it in DosBox with Borland Turbo C 2.0.
There are no control characters in the string, so a copy-paste should work.
Compile with tiny memory model or else...

typedef int (* pfun)();
main ()
{
    pfun passwd = (pfun) "¬< sûŠDþ,#ÃEq{1Kt:=qQ+ƒ.?&m):|YH)†P$Pzs/7Tk,2o0&(CƒzIzB-E+\l^Dk‚sw.'..Hjp~T8WSN.pWc&,8Idhwƒq*jsq&„";

    printf ("password %d\n", passwd());
}

If you disassemble the start of the string, you'll see something like:

scan: lodsb
      cmp al,32
      jae scan
      mov al,[si-2]
      sub al, 35
      ret

since si is used as function address, it points directly to the code, followed by the passwords.

All values are shifted by 35 to avoid escaping control characters and double quotes.

The code is 11 bytes long, so it will work up to 12 characters.

Unfortunately, the 11th value (34) is too low to produce a valid password with an increased shift value (ret opcode is 195, so you would need a shift of 161, and the maximal shift to avoid a rollover is 255-99=156).

11 characters will produce a wrong value, and your virtual PC will likely crash with 10 characters or less.

added 216 characters in body
Source Link
user16991
user16991
Loading
added 216 characters in body
Source Link
user16991
user16991
Loading
edited body
Source Link
user16991
user16991
Loading
Source Link
user16991
user16991
Loading