Rocksolid Light

Welcome to Rocksolid Light

register   nodelist   faq  


rocksolid / rocksolid.nodes / Re: hey, what do you know: vichan supports nntp

SubjectAuthor
* hey, what do know ? vichan supports nntpanon
+* Re: hey, what do know ? vichan supports nntpanon
|`* Re: hey, what do know ? vichan supports nntpRetro Guy
| `* Re: hey, what do know ? vichan supports nntpanon
|  `* Re: hey, what do know ? vichan supports nntpRetro Guy
|   `* Re: hey, what do know ? vichan supports nntpanon
|    `* Re: hey, what do know ? vichan supports nntpanon
|     `* Re: hey, what do know ? vichan supports nntpRetro Guy
|      `* Re: hey, what do know ? vichan supports nntpanon
|       `* Re: hey, what do know ? vichan supports nntpanon
|        +* Re: hey, what do know ? vichan supports nntpanon
|        |`* Re: hey, what do know ? vichan supports nntpanonymous
|        | +* Re: hey, what do know ? vichan supports nntpRetro Guy
|        | |`* Re: hey, what do know ? vichan supports nntpanon
|        | | `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        | |  `* Re: hey, what do know ? vichan supports nntpanonymous
|        | |   `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        | |    `* Re: hey, what do know ? vichan supports nntpanonymous
|        | |     `* Re: hey, what do know ? vichan supports nntpanon
|        | |      +* Re: hey, what do you know: vichan supports nntpanon
|        | |      |+- Re: hey, what do you know: vichan supports nntpRetro Guy
|        | |      |`* Re: hey, what do you know: vichan supports nntpanon
|        | |      | `- Re: hey, what do you know: vichan supports nntpRetro Guy
|        | |      `- Re: hey, what do know ? vichan supports nntpRetro Guy
|        | `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        |  `* Re: hey, what do know ? vichan supports nntpanonymous
|        |   `* Re: hey, what do know ? vichan supports nntpanonymous
|        |    `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     +* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |`* Re: hey, what do know ? vichan supports nntpanonymous
|        |     | `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |  `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |   `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        |     |    `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |     `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |      `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |       `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |        `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        |     |         `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |          `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |           `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        |     |            `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |             `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |              `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        |     |               `* Re: hey, what do know ? vichan supports nntpanon
|        |     |                `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        |     |                 `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |                  `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |                   `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |                    `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |                     `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        |     |                      `* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |                       +* Re: hey, what do know ? vichan supports nntpanonymous
|        |     |                       |+- Re: hey, what do know ? vichan supports nntpanonymous
|        |     |                       |`- Re: hey, what do know ? vichan supports nntpRetro Guy
|        |     |                       `* Re: hey, what do know ? vichan supports nntpRetro Guy
|        |     |                        `- Re: hey, what do know ? vichan supports nntpanonymous
|        |     `- Re: hey, what do know ? vichan supports nntpRetro Guy
|        `- Re: hey, what do know ? vichan supports nntpRetro Guy
+- Re: hey, what do know ? vichan supports nntpanon
+* Re: hey, what do know ? vichan supports nntpanon
|`* Re: hey, what do know ? vichan supports nntpanonymous
| +- Re: hey, what do you know....anon
| `* Re: hey, what do know ? vichan supports nntpanonymous
|  `* Re: hey, what do know ? vichan supports nntpRetro Guy
|   `- Re: hey, what do know ? vichan supports nntpanon
+* basics are workingAnonymous
|`- Re: basics are workingRetro Guy
+* guess i will open for business soonAnonymous
|+* Re: guess i will open for business soonMei
||`- Re: guess i will open for business soonRetro Guy
|`- Re: guess i will open for business soonRetro Guy
+- opsec check is goodAnonymous
+- > goo to go.Anonymous
+* yes that should workAnonymous
|`- Re: yes that should workRetro Guy
+* cron or not ?Anonymous
|`- Re: cron or not ?Retro Guy
+- themes on def2.i2pAnonymous
`* ok, ok, i switched the default themeAnonymous
 `* Re: ok, ok, i switched the default themeMei
  `- Re: ok, ok, i switched the default themeanon

Subject: Re: hey, what do know ? vichan supports nntp
From: anon@anon.com (anon)
Newsgroups: rocksolid.nodes
Organization: def5
Date: Fri, 15 May 2020 22:52 UTC

if i enter MODE READER on the rslight nntp server, it says:
200 Rocksolid Light NNRP Server ready (no posting)
seems like posting in this mode does not work ?

Posted on def4


Subject: Re: hey, what do you know: vichan supports nntp
From: anon@anon.com (anon)
Newsgroups: rocksolid.nodes
Organization: def5
Date: Fri, 15 May 2020 23:42 UTC

fputs($s,"AUTHINFO USER $server_auth_user
");
      $weg=line_read($s);
      fputs($s,"AUTHINFO PASS $server_auth_pass
");
      $weg=line_read($s);
      if (substr($weg,0,3) != "281" {
        AUTH FAILED
        can't do stuff...
      } else {
        IT DIDN"T FAIL, YAY!
        do stuff...
      }

And I guess the "do stuff" would be some variant of message_post and message_post_with_attachment from /lib/post.inc.php. not sure it is better to just put that code into the vichan function, or to call some function in the rslight framework. i guess the latter, this way we can do minimal changes on the vichan code. actually, the way this is done in vi might be superior, because the whole message is already composed and then sent in one go (instead of composing and sending the individual pieces).
now it gets a bit tricky, i have to read up a bit on nntp before i can continue.

cheers

trw

Posted on def4


Subject: Re: hey, what do know ? vichan supports nntp
From: retroguy@retrobbs.rocksolidbbs.com (Retro Guy)
Newsgroups: rocksolid.nodes
Organization: Rocksolid
Date: Fri, 15 May 2020 22:40 UTC
anon wrote:


if i enter MODE READER on the rslight nntp server, it says:
200 Rocksolid Light NNRP Server ready (no posting)
seems like posting in this mode does not work ?

It doesn't actually change anything, it just sends the '200' reply.

You can post once authenticated. Try the same commands with an inn server
and you should see almost exactly the same response.




Subject: Re: hey, what do you know: vichan supports nntp
From: retroguy@retrobbs.rocksolidbbs.com (Retro Guy)
Newsgroups: rocksolid.nodes
Organization: Rocksolid
Date: Fri, 15 May 2020 22:48 UTC
anon wrote:


fputs($s,"AUTHINFO USER $server_auth_user
");
      $weg=line_read($s);
      fputs($s,"AUTHINFO PASS $server_auth_pass
");
      $weg=line_read($s);
      if (substr($weg,0,3) != "281" {
        AUTH FAILED
        can't do stuff...
      } else {
        IT DIDN"T FAIL, YAY!
        do stuff...
      }

And I guess the "do stuff" would be some variant of message_post and
message_post_with_attachment from /lib/post.inc.php. not sure it is better
to just put that code into the vichan function, or to call some function
in the rslight framework. i guess the latter, this way we can do minimal
changes on the vichan code. actually, the way this is done in vi might be
superior, because the whole message is already composed and then sent in
one go (instead of composing and sending the individual pieces). now it
gets a bit tricky, i have to read up a bit on nntp before i can continue.

Yes, rslight builds the message. I wouldn't use message_post with vichan,
it's not necessary. If the message is already built, it's easy to post
straight to the nntp server. See the 'post_articles' function in send.php.
It just sends messages sitting in a folder but as long as it has a message
it's a simple matter to send it:

if(!is_file($outgoing_dir.$message)) {
      continue;
    }
    echo "Sending: ".$outgoing_dir.$message."\r\n";
    fputs($ns, "MODE READER\r\n");
    $response = line_read($ns);
    if (strcmp(substr($response,0,3),"200") != 0) {
        file_put_contents($logfile, "\n".format_log_date()." ".
$config_name." Unexpected response to MODE command: ".$respon
se, FILE_APPEND);
      return $response;
    }
    fputs($ns, "POST\r\n");
    $response = line_read($ns);
    if (strcmp(substr($response,0,3),"340") != 0) {
      file_put_contents($logfile, "\n".format_log_date()." ".$config_name."
Unexpected response to POST command: ".$response
, FILE_APPEND);
      return $response;
    }
    $message_fp = fopen($outgoing_dir.$message, "rb");
    while (($msgline = fgets($message_fp, 4096)) !== false) {
      fputs($ns, $msgline);
    }
    fputs($ns, ".\r\n");
    fclose($message_fp);
    $response = line_read($ns);
    if (strcmp(substr($response,0,3),"240") == 0) {
      unlink($outgoing_dir.$message);
      file_put_contents($logfile, "\n".format_log_date()." ".$config_name."
Posted: ".$message.": ".$response, FILE_APPEND);
    } else {
      file_put_contents($logfile, "\n".format_log_date()." ".$config_name."
Failed to POST: ".$message.": ".$response, FILE_
APPEND);
      continue;
    }




Subject: Re: hey, what do you know: vichan supports nntp
From: anon@anon.com (anon)
Newsgroups: rocksolid.nodes
Organization: def5
Date: Sat, 16 May 2020 00:13 UTC

See the 'post_articles' function in send.php.

I don't have any send.php, ok, strike that, i found it.

why do need to put the scripts in /etc/rslight/ ? (rant over).

i guess in your example there would have to be some auth before ? and then you would need to import a whole bunch of libs again to do it in the rslight way ? or directly like you have written before.
maybe the easiest way is the best here: just drop the message in the spool, and let rslight take care of the rest ?

Posted on def4


Subject: Re: hey, what do you know: vichan supports nntp
From: retroguy@retrobbs.rocksolidbbs.com (Retro Guy)
Newsgroups: rocksolid.nodes
Organization: Rocksolid
Date: Fri, 15 May 2020 23:32 UTC
anon wrote:


See the 'post_articles' function in send.php.

I don't have any send.php, ok, strike that, i found it.

why do need to put the scripts in /etc/rslight/ ? (rant over).

Well, they need to be somewhere :) That's just where I settled as I didn't
want yet another directory to be necessary. I don't want them accessible by
a browser also.

i guess in your example there would have to be some auth before ? and then
you would need to import a whole bunch of libs again to do it in the
rslight way ? or directly like you have written before. maybe the easiest
way is the best here: just drop the message in the spool, and let rslight
take care of the rest ?

Yes, if you drop a properly formatted message in the spool
/var/spool/rslight/rocksolid/outgoing, it should be sent.

Since vichan makes a full message with headers, I don't think there is going
to be much difficulty to send it by several different methods.




Subject: Re: hey, what do know ? vichan supports nntp
From: retroguy@retrobbs.rocksolidbbs.com (Retro Guy)
Newsgroups: rocksolid.nodes
Organization: Rocksolid
Date: Sat, 16 May 2020 08:17 UTC
anonymous wrote:

and here is where the hacking starts:

function nntp_publish($msg, $id) {
        global $config;
        $server = $config["nntpchan"]["server"];
        $s = fsockopen("tcp://$server");
        fgets($s);
        fputs($s, "MODE STREAMrn");
        fgets($s);
        fputs($s, "TAKETHIS $idrn");
        fputs($s, $msg);
        fputs($s, "rn.rn");
        fgets($s);
        fputs($s, "QUITrn");
        fclose($s);
}

It might help a lot to see exactly how vichan formats a post it wants to
send via nntp. Maybe if we temporarily change this function to:

function nntp_publish($msg, $id) {
$save_postfh = fopen("/tmp/vichanpost.txt", 'w');
fputs($save_postfh, $msg);
fclose($save_postfh);
}

then we have a saved copy of a post to look at. If we need to modify it to
post properly to inn, rslight etc., we can modify it right in this function
before sending it (for example, maybe we need to add a Message-ID or convert
line breaks, etc.) Maybe adding auth here might be a good place also.

It also looks like this function doesn't return anything so vichan has no
way of knowing if the posting was successful (looks like that anyway).

Retro Guy




Subject: Re: hey, what do know ? vichan supports nntp
From: anonymous@anon.com (anonymous)
Newsgroups: rocksolid.nodes
Organization: def2
Date: Sat, 16 May 2020 16:46 UTC
this is a text message generated by vichan:

--------------------------------------------
Message-Id: <ts.6.3iy3w3@anon.com>
Newsgroups: rocksolid.nodes
Date: Sat, 16 May 2020 09:37:58 -0700
Subject: and the reply
From: Anonymous <poster@anon.com>
References: <ts.3.3xowan@anon.com>
Content-Type: text/plain; charset=UTF-8

reply


--------------------------------------------
That should do, doesn't look anything strange.
--
Posted on def2
z5bqfv5v75kxy7pj.onion


Subject: Re: hey, what do know ? vichan supports nntp
From: anonymous@anon.com (anonymous)
Newsgroups: rocksolid.nodes
Organization: def2
Date: Sat, 16 May 2020 17:07 UTC
and this is a message with a picture attached:

Message-Id: <ts.7.geb57@anon.com>
Newsgroups: rocksolid.nodes
Date: Sat, 16 May 2020 09:55:47 -0700
Subject: and one with a picture
From: Anonymous <poster@anon.com>
References: <ts.3.3xowan@anon.com>
Content-Type: multipart/mixed; boundary=1e4369a05339eca512b691687b1adb267f4539a1
Mime-Version: 1.0

--1e4369a05339eca512b691687b1adb267f4539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EBWAwAAAEBWAwAAAABkNQAAAABAVgMAAABAVgMAAAAAZDUAAAAAZDUAAAAAQFYDAAAAAGQ1AAAAAGQ1AAAAAEBWAwAAAEBWAwAAAABkNQAAAABAVgMAAABAVgMAAAAAZDUAAAAAZDUAAAAAQFYDAAAAAGQ1AAAAgI3s/wdQfeE
tK64S+QAAAABJRU5ErkJggg==
--1e4369a05339eca512b691687b1adb267f4539a1--

-------------------------------------------------------------------------------
looks good as well.

i will try and just put the files in the outspool.

cheers

trw
--
Posted on def2
z5bqfv5v75kxy7pj.onion


Subject: Re: hey, what do know ? vichan supports nntp
From: anonymous@anon.com (anonymous)
Newsgroups: rocksolid.nodes
Organization: def2
Date: Sat, 16 May 2020 18:01 UTC
ok, just inserting those two into the outspool of rslight made them appear on rocksolid.shared.test (this was the defined group). works out of the box.

to do:

-threading is broken (guess the header is not correct by our standards)
-attachment is lost (guess the b64 way of doing things is not overall appreciated)

but wow, here i thought i needed to actually code something, and instead it just works and merely needs some tweaks. great.

btw, i can see now why the software was appreciated so widely, it is just done very nicely, lots of features and still easy to use (and being able to see and understand what is under the hood). one of the nicer features for developmnt is the debug output to the webserver. just very convenient.

this is gonna be great.

cheers

trw
--
Posted on def2
z5bqfv5v75kxy7pj.onion


Pages:123456789
rocksolid light 0.6.5e
clearnet i2p tor