Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

hidden BBCode messages

Name: Anonymous 2013-03-04 13:35

[o][/o]=0
[i][/i]=1
check page source

also read this:
http://en.wikipedia.org/wiki/Steganography

Name: Anonymous 2013-03-04 13:54

Name: Anonymous 2013-03-04 13:57

Name: Anonymous 2013-03-04 14:01

Aww, baby just found out about steganography. Too bad anyone looking for secret messages is going to find a shitload of empty html tags.

Name: Anonymous 2013-03-04 14:04

Also, I might add that these messages would be more effective (and less noticeable) if added to the end of a regular post, rather than only posting hidden BBCode, resulting in what appears to be a ``blank'' post.
Also, with BBCode -> HTML -> Binary -> Base64(?), the possibilities are endless... more than just silly ASCII messages like we're using right now. But for now, they can just be little `muttered-under-your-breath'' type messages, I suppose.

Name: Anonymous 2013-03-04 14:05

>>4
Hey, at least this isn't another thread about jews or ``lel egin shitposting groski''.

Name: Anonymous 2013-03-04 14:50

>>6
It is now!

Name: Anonymous 2013-03-04 14:53

Could someone write a decoder? I have an assignment and I need to see what important messages you have hidden for me.
Also, in a similar vein, but allowing for more concise messages:
[aa] = 000
[b] = 001
[i] = 010
[m] = 011
[o] = 100
[u] = 101
[sup] = 110
[sub] = 111
Let's say it's MSB->LSB and trailing bits (the last length%8 bits) are ignored, unless someone can come up with a better system (and rationale)

Name: Anonymous 2013-03-04 14:54

>>8
I was going for alphabetical ordering but switched sub and sup, my bad

Name: Anonymous 2013-03-04 14:57

>>6

Name: Anonymous 2013-03-04 14:58

>>8
It's a programming board. If you need somebody to write you the decoder then what the fuck are you doing here?

Name: Anonymous 2013-03-04 14:59

Newbies. Experts use unicode homoglyphs.

Name: Anonymous 2013-03-04 15:00

>>11
I have to program things of actual consequence. Also I am not one for reinventing wheels.

Name: Anonymous 2013-03-04 15:30

>>10
Stop that.

Name: Anonymous 2013-03-04 15:39

Name: Anonymous 2013-03-04 15:42

Name: Anonymous 2013-03-04 19:02

=0
=1

Name: Anonymous 2013-03-04 19:31

Name: Anonymous 2013-03-04 20:50

Name: Anonymous 2013-03-04 23:47

>>19
clever

Name: Anonymous 2013-03-05 0:52

Name: Anonymous 2013-03-05 1:09

[o][/o]=00
[i][/i]=01
[b][/b]=10
[u][/u]=11

Compare the shapes of the letters to their values.

Name: Anonymous 2013-03-05 1:15

space is 1, non-breaking space is 0
[aes]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               [/aes]

Name: Anonymous 2013-03-05 6:44

Damn. Tried to post the encoded version of the encoder/decoder but it's too large with OP's scheme.

>>22 is good. Perhaps should use that.

Name: Anonymous 2013-03-05 7:13

Let's see. Terse encoder for >>22:

Name: Anonymous 2013-03-05 7:23

>>25
Right, pasted the wrong output. Testing again.

Name: Anonymous 2013-03-05 7:30

>>26
Decoder to be used with:
[m]
cat html_tags.txt | sed 's/<u><\/u>/11/g' | sed 's/<b><\/b>/10/g' | sed 's/<i><\/i>/01/g' | sed 's/<span class="o"><\/span>/00/g' | ./decoder
[\m]
In True UNIXTM style.

Name: Anonymous 2013-03-05 7:34

>>27
cat html_tags.txt | sed 's/<u><\/u>/11/g' | sed 's/<b><\/b>/10/g' | sed 's/<i><\/i>/01/g' | sed 's/<span class="o"><\/span>/00/g' | ./decoder
BBCode failure due to sed poisoning my mind.

Seems to work, anyway. Can post short snippets of code with >22's scheme.

Name: Anonymous 2013-03-05 7:56

>>22,24
Why not >>8?

Name: Anonymous 2013-03-05 8:00

>>29

The code required to post with >>8's scheme would have made the encoder/decoder.c much larger due to having to deal with aligning bytes and whatnot. Those encoded posts are only ~6 lines of C, and I don't think you can post more than 12 or so. So it probably wouldn't have fit in a post, even if the scheme is more efficient.

Name: Anonymous 2013-03-05 8:41

>>30
There is no aligning bytes, just think of it as similar to base64. Extra bits are discarded.

Name: () !!var9KdY9ji7pxRk 2013-03-05 11:57

I spent far too much time on this. I'll generalize it later implement >>8-san's scheme.


#include <stdio.h>
#include <strings.h>

#define INMATCH -10
#define BROKEN -20

static char dead[255] = {0};

typedef struct {
  char **table;
  int n; // number of entries
  int s; // byte slices per entry
  int m; // shift factor
} scheme;

int get_match(char **needles, int n, char c){

  static int pos = 0;
  static char alive[255] = {0};

  int match = -1;

  for (int i = 0; i < n; ++i){
    if (pos == 0)
      alive[i] = (needles[i][pos] == c);
    else if (alive[i]){
      alive[i] = (needles[i][pos] == c);
      if (alive[i] && needles[i][pos+1] == '\0'){
    match = i;
    break;
      }
    }
  }

  if (memcmp(alive, dead, 255) == 0){
    pos = 0;
    return BROKEN;
  }
  else if (match != -1){
    memset(alive, 0x00, 255);
    pos = 0;
    return match;
  }
  else {
    ++pos;
    return INMATCH;
  }

}

void parse_hidden(scheme *prog, int v, FILE *file){
 
#define GETINPUT(z) (z = fgetc(file))

  char parts[1024*16];

  int x = 0, c = 1, t = BROKEN, b = 0, h = 0;

  t = get_match(prog[0].table, prog[0].n, GETINPUT(c));

  while (c != EOF){

    if (t == BROKEN){
      if (b != 0 && h != 0){
    fprintf(stdout, "\n+----------------- - - -\n|  \n|  ");
    int n, o, m, s;

    if ( h < (prog[1].n) ){
      n = prog[1].n;
      s = prog[1].s;
      m = prog[1].m;
    }
    else {
      n = prog[0].n;
      s = prog[0].s;
      m = prog[0].m;
    }
   
    for (int i = 0; i < b;){
      x = 0;
      for (o = s-1; o >= 0;)
        x = (parts[i++] << (o--*m)) | x;
     
      if ((x >= 32 && x <= 126) || x == '\n' || x == '\r'){
        fputc(x, stdout);
        if (x == '\n')
          fprintf(stdout, "|  ");
      }
    }
      }
      b = 0;
      h = 0;
    }

    if (t == BROKEN && c != EOF)
      do t = get_match(prog[0].table, prog[0].n, GETINPUT(c)); while (t == BROKEN && c != EOF);

    while (t == INMATCH && c != EOF)
      t = get_match(prog[0].table, prog[0].n, GETINPUT(c));

    if (c == EOF) break;
    if (t == BROKEN){
      t = get_match(prog[0].table, prog[0].n, GETINPUT(c));
      continue;
    }

    parts[b++] = t;
    if (t > h) h = t;

    t = get_match(prog[0].table, prog[0].n, GETINPUT(c));
   
  }
}

int main(int argc, char **argv){

  char *tableu4[] = {
    "<span class=\"o\"></span>",\
    "<i></i>",
    "<b></b>",
    "<u></u>"
  };

  scheme prog[2] =  {
    {
      .table = tableu4,
      .n = 4,
      .s = 4,
      .m = 2
    },
    {
      .table = tableu4,
      .n = 2,
      .s = 8,
      .m = 1
    }
  };
 
  parse_hidden(prog, 2, stdin);

  fprintf(stdout, "\n+----------------- - - -\n\n");

  return 0;
}

Name: () !!var9KdY9ji7pxRk 2013-03-05 11:58

Detects encodings automatically. Or tries to. Result of running it on this thread:


+----------------- - - -

|  lol dongs
+----------------- - - -

|  dongs you say?

|  Back to /b/ ``please''.
+----------------- - - -

>>2
|  No thank you!
+----------------- - - -

|  penis penis penis penis lol
+----------------- - - -

|  LLLLLEEEEEEEEEELLLLLLLLLLLLLLLLLLLLLLLLLLLL
|  >EGIN WIN /G/RO
|  >LEL DONGS AMIRITE???? XDDDDDDDDD
+----------------- - - -

>>14

|  u mad?
+----------------- - - -

>>15
|  /backplate getgoes/
+----------------- - - -


+----------------- - - -

|  u wot m8
+----------------- - - -


+----------------- - - -

i(X8I9Y((ih-huh}|uu8iuiu8uu8]u]u}iyIi(iI8)IIhi8i)i9Y((|Y(ihhH|Qh(i|i<ih
+----------------- - - -

|  #include <stdio.h>
|  char *table[] = {"","","",""};
|  int main(int argc, char **argv){
|    int c, i;
|    while ( (c = fgetc(stdin)) != EOF)
|      for (i = 3; i >= 0; i--)
|        printf("%s",table[((c>>(i*2))&0x03)]);
|  }

+----------------- - - -

|  #include <stdio.h>
|  int main(int argc, char **argv){
|    int c;
|    unsigned char x, j;
|    do    
|      for (j = 0; j < 8; j++){
|        c = fgetc(stdin);
|        if (c == EOF) goto end;
|        x=((x<<1)|!(c=='0'));
|      } while (putchar(x));
|   end:
|    return 0;
|  }

+----------------- - - -


Fucked up post in the middle is the one where I pasted the wrong output.

Enjoy.

Name: () !!var9KdY9ji7pxRk 2013-03-05 12:01

>>32,33

Right, the usage is just pipe wget to it:

wget https://dis.4chan.org/read/prog/1362422118 -O- | ./decoder

Name: Anonymous 2013-03-05 14:37

>>34
I truly appreciate you as a person. I enjoyed reading your contribution. I've read it multiple times. Please contribute MORE.

Name: Anonymous 2013-03-05 14:53

>>34
wget CONSIDERED HARMFUL. Please use curl instead.

Name: () !!Ai4A74t6Ig2AEJF 2013-03-05 15:25

>>36
But then I might get RCE'd by moot: http://blog.volema.com/curl-rce.html
Force of habit, more than anything. I'll keep it in mind.
>>35
Thanks.

Here, I've made the code a bit more EXPERT. Better flow, took out some superfluous stuff.


[#]
#include <stdio.h>
#include <string.h>

#define INMATCH -10
#define BROKEN -20

typedef struct {
    char **table;
    int n; // number of entries
    int s; // byte slices per entry
    int m; // shift factor
} scheme;

int get_match(scheme *entry, char c){

    static int pos = 0;
    static char alive[255] = {0};
    const static char dead[255] = {0};

    char **needles = entry->table;
    int n = entry->n;

    int match = -1;

    for (int i = 0; i < n; ++i){
        if (pos == 0)
            alive[i] = (needles[i][pos] == c);
        else if (alive[i]){
            alive[i] = (needles[i][pos] == c);
            if (alive[i] && needles[i][pos+1] == '\0'){
                match = i;
                break;
            }
        }
    }

    if (memcmp(alive, dead, 255) == 0){
        pos = 0;
        return BROKEN;
    }
    else if (match != -1){
        memset(alive, 0x00, 255);
        pos = 0;
        return match;
    }
    else {
        ++pos;
        return INMATCH;
    }

}

void parse_hidden(scheme *prog, int v, FILE *file, FILE *fout){

#define GETINPUT(z) (z = fgetc(file))

    char parts[1024*16];

    int c = 1, t = BROKEN, b = 0, h = 0;

    do {

        t = get_match(prog, GETINPUT(c));

        if (t == BROKEN){
            if (b != 0 && h != 0){
                int n, o, m, s;

                o = (h > 1) ? 0 : 1;

                n = prog[o].n;
                s = prog[o].s;
                m = prog[o].m;

                if (b >= s){
                fprintf(fout, "\n+----------------- - - -\n|    \n|    ");
                    for (int i = 0, x = 0; i < b; x = 0){
                        for (o = s-1; o >= 0; x = (parts[i++] << (o--*m)) | x);
                        if ((x >= 32 && x <= 126) || x == '\n' || x == '\r')
                            if (fputc(x, fout) == '\n')
                                fprintf(fout, "|    ");
                    }
                }
            }
           
            b = 0;
            h = 0;

            do t = get_match(prog, GETINPUT(c)); while (t == BROKEN && c != EOF);
        }

        while (t == INMATCH)
            t = get_match(prog, GETINPUT(c));

        if (c == EOF) break;
        if (t == BROKEN) continue;

        parts[b++] = t;
        if (t > h) h = t;

    } while (c != EOF);

#undef GETINPUT

    fprintf(fout, "\n+----------------- - - -\n\n");
}

int main(int argc, char **argv){

    char *tableu4[] = {
        "<span class=\"o\"></span>",
        "<i></i>",
        "<b></b>",
        "<u></u>"
    };

    scheme prog[2] =    {
        {
            .table = tableu4,
            .n = 4,
            .s = 4,
            .m = 2
        },
        {
            .table = tableu4,
            .n = 2,
            .s = 8,
            .m = 1
        }
    };

    parse_hidden(prog, 2, stdin, stdout);

    return 0;
}
[/#]


Proper indentation now since I'm at home and not using the crap at work. Works a little better now, too.

Name: () !!var9KdY9ji7pxRk 2013-03-05 15:27

>>37

Well, shit. I hope I didn't write down the trip wrong. Whatever, I guess.

New output:




+----------------- - - -
|   
|    lol dongs
+----------------- - - -
|   
|    dongs you say?
|   
|    Back to /b/ ``please''.
+----------------- - - -
|   
|    >>2

|    No thank you!
+----------------- - - -
|   
|    penis penis penis penis lol
+----------------- - - -
|   
|    LLLLLEEEEEEEEEELLLLLLLLLLLLLLLLLLLLLLLLLLLL
|    >EGIN WIN /G/RO
|    >LEL DONGS AMIRITE???? XDDDDDDDDD
+----------------- - - -
|   
|    >>14
|   
|    u mad?
+----------------- - - -
|   
|    >>15

|    /backplate getgoes/
+----------------- - - -
|   
|    u wot m8
+----------------- - - -
|   
|    [o][/o][i][/i][o][/o][i][/i][i][/i][o][/o][i][/i][i][/i][o][/o][i][/i][i][/i][o][/o][i][/i][o][/o][o][/o][i][/i][o][/o][i][/i][o][/o][i][/i][i][/i][i][/i][o][/o][i][/i]
+----------------- - - -
|   
|    i9]Y<i))II9Yu|uu8iuiu8uu8]u]u}iyIi(iI8)IIhi8i)i9Y((|Y(ihhH|Qh(i|i<ih
i(X8I9Y((ih-huh}
+----------------- - - -
|   
|    #include <stdio.h>
|    char *table[] = {"[o][/o]","[i][/i]","[b][/b]","[u][/u]"};
|    int main(int argc, char **argv){
|      int c, i;
|      while ( (c = fgetc(stdin)) != EOF)
|        for (i = 3; i >= 0; i--)
|          printf("%s",table[((c>>(i*2))&0x03)]);
|    }
|   
+----------------- - - -
|   
|    #include <stdio.h>
|    int main(int argc, char **argv){
|      int c;
|      unsigned char x, j;
|      do    
|        for (j = 0; j < 8; j++){
|          c = fgetc(stdin);
|          if (c == EOF) goto end;
|          x=((x<<1)|!(c=='0'));
|        } while (putchar(x));
|     end:
|      return 0;
|    }
|   
+----------------- - - -
|   
|    [i]
+----------------- - - -


Name: Anonymous 2013-03-05 16:07

test

Name: Anonymous 2013-03-05 16:11

@-

Name: Anonymous 2013-03-05 16:12

-

Name: Anonymous 2013-03-05 16:28

Name: Anonymous 2013-03-05 18:09

>>44
nice dubs bro

Name: Anonymous 2013-03-05 23:15

check 'em

Name: Anonymous 2013-03-31 10:51

bump

Don't change these.
Name: Email:
Entire Thread Thread List