Rocksolid Light

Welcome to novaBBS

register   nodelist   faq  

Your account also provides newsreader access to all groups at news.i2pn2.org port 119 or 563 (TLS)


rocksolid / Programming / Re: vichan to do list

SubjectAuthor
* Re: vichan to do listanon
`* Re: vichan to do listanon
 `- Re: vichan to do listMarc SCHAEFER

1
Subject: Re: vichan to do list
From: ano...@anon.com (anon)
Newsgroups: rocksolid.programming
Organization: def5
Date: Thu, 4 Jun 2020 12:27 UTC
Path: i2pn2.org!rocksolid2!def5!POSTED.localhost!not-for-mail
From: anon <anon@anon.com>
Newsgroups: rocksolid.programming
Message-ID: <35db30288bbd4e1413b8b0eaa046e842@def4>
Subject: Re: vichan to do list
Date: Thu, 04 Jun 2020 12:27:04+0000
Organization: def5
In-Reply-To: <code.100.gmepn@anon.com>
References: <code.100.gmepn@anon.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Xref: rslight2 rocksolid.programming:16
Message-ID: <35db30288bbd4e1413b8b0eaa046e842@def4>

actually, the messages are mime encoded so vichan should be able to parse them if they are sent correctly. that would be the best way imo (to let vichan do the parsing).
if i could just read the code that was used to upload.

Posted on def4


Subject: Re: vichan to do list
From: ano...@anon.com (anon)
Newsgroups: rocksolid.programming
Organization: def5
Date: Thu, 4 Jun 2020 13:22 UTC
Path: i2pn2.org!i2pn.org!rocksolid2!def5!POSTED.localhost!not-for-mail
From: anon <anon@anon.com>
Newsgroups: rocksolid.programming
Message-ID: <baaa76a54beb2e083eff23bc515a509e@def4>
Subject: Re: vichan to do list
Date: Thu, 04 Jun 2020 13:22:25+0000
Organization: def5
In-Reply-To: <35db30288bbd4e1413b8b0eaa046e842@def4>
References: <35db30288bbd4e1413b8b0eaa046e842@def4>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Xref: rslight2 rocksolid.programming:17
Message-ID: <baaa76a54beb2e083eff23bc515a509e@def4>

i will try that soon. meanwhile, here is what a request to vichans post.php looks like:

POST /post.php HTTP/1.1
Host: xxxxxxxxxxxxxxxx.onion
User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://xxxxxxxxxxxxxxxx.onion/ts/index.html
Content-Type: multipart/form-data; boundary=---------------------------234374660515071969761262837861
Content-Length: 16935
Connection: keep-alive
Upgrade-Insecure-Requests: 1

-----------------------------234374660515071969761262837861
Content-Disposition: form-data; name="nke73c⛻lgoujxyd8⛆4asvr6wf92ih0t"

♦M+<Q4]#(X7J☳FLzh*q,⛻-x8'⚜☯AHac☀IS
-----------------------------234374660515071969761262837861
Content-Disposition: form-data; name="q"

M3Ce⚋tv+&hA `!>1j;q
-----------------------------234374660515071969761262837861
Content-Disposition: form-data; name="board"

ts
-----------------------------234374660515071969761262837861
Content-Disposition: form-data; name="t82o♁kq5970cs3♠dpujmbwvz"

66873
-----------------------------234374660515071969761262837861
Content-Disposition: form-data; name="page"

1
-----------------------------234374660515071969761262837861
Content-Disposition: form-data; name="lastname"


-----------------------------234374660515071969761262837861
Content-Disposition: form-data; name="subject"

testing some
-----------------------------234374660515071969761262837861
Content-Disposition: form-data; name="post"

Post
-----------------------------234374660515071969761262837861
Content-Disposition: form-data; name="url"

♊TK@!mr2=QM4J:).0I65ny,⛳oWa
-----------------------------234374660515071969761262837861
Content-Disposition: form-data; name="body"

here is some text
-----------------------------234374660515071969761262837861
Content-Disposition: form-data; name="text"

2nP.e0mZ_C{,)E?Q>d!1♭b@V|J7<
-----------------------------234374660515071969761262837861
Content-Disposition: form-data; name="file"; filename="woman-e1590571316950-380x214.jpg"
Content-Type: image/jpeg

<FF><D8><FF><E0>^@^PJFIF^@^A^A^A^@H^@H^@^@<FF><DB>^@C^@^H^F^F^G^F^E^H^G^G^G            ^L^T^M^L^K^K^L^Y^R^S^O^T^]^Z^_^^^]^Z^\^\ $.' ",#^\^\
|
|cut out the rest here
|

-----------------------------234374660515071969761262837861
Content-Disposition: form-data; name="password"


-----------------------------234374660515071969761262837861
Content-Disposition: form-data; name="hash"

9f9927bd6ca11c6b4379c17b9273cab58fadefb3
-----------------------------234374660515071969761262837861--


note all the fields that are disregarded later, just to catch spambots. :-)

if i can rewrite that with php and send it as raw http i think we might be able to use the native post.php of vichan (with some minor adaptions).
but for shortterm, i will try your script soon.

cheers

trw

Posted on def4


Subject: Re: vichan to do list
From: schae...@alphanet.ch (Marc SCHAEFER)
Newsgroups: rocksolid.programming
Organization: Posted through ALPHANET (https://news.alphanet.ch/)
Date: Tue, 9 Jun 2020 11:45 UTC
Path: i2pn2.org!i2pn.org!weretis.net!feeder7.news.weretis.net!news.uzoreto.com!news.alphanet.ch!alphanet.ch!.POSTED!news.alphanet.ch!not-for-mail
From: Marc SCHAEFER <schaefer@alphanet.ch>
Newsgroups: rocksolid.programming
Subject: Re: vichan to do list
Date: Tue, 9 Jun 2020 13:45:23 +0200 (CEST)
Organization: Posted through ALPHANET (https://news.alphanet.ch/)
Lines: 27
Message-ID: <rbnsoj$dcr$1@shakotay.alphanet.ch>
References: <35db30288bbd4e1413b8b0eaa046e842@def4> <baaa76a54beb2e083eff23bc515a509e@def4>
NNTP-Posting-Host: localhost
X-Trace: shakotay.alphanet.ch 1591703123 13725 127.0.0.1 (9 Jun 2020 11:45:23 GMT)
X-Complaints-To: usenet@alphanet.ch
NNTP-Posting-Date: Tue, 9 Jun 2020 11:45:23 +0000 (UTC)
User-Agent: tin/2.2.1-20140504 ("Tober an Righ") (UNIX) (Linux/3.16.0-10-amd64 (x86_64))
Xref: rslight2 rocksolid.programming:55
Message-ID: <rbnsoj$dcr$1@shakotay.alphanet.ch>
anon <anon@anon.com> wrote:
POST /post.php HTTP/1.1

In case, you can see JSON from my read-only newsreader here:

https://nnrp.alphanet.ch/newsgroup/rocksolid.programming/%3C8cb53de068f68ce971aa235b44272aab%241%40news.novabbs.com%3E?mode=json

Implementation:

   if ($self->param('mode') eq 'json') {
      my %headers;
  
      my $headers = $a->headers;
      # yeah, not simple re
      #    - to make the loop work, we need to not remove the final \n if any, so we use
      #      a look-ahead: https://stackoverflow.com/questions/3926451/how-to-match-but-not-capture-part-of-a-regex
      #    - we accept continuation lines
      #    - maybe the header re is a bit too strict
      #    - 'rest' should be empty if all was right
      $headers =~ s/(^|\n)([a-zA-Z0-9\-]+):\s?(.*)(\n\s+.*|)(?=\n|$)/$headers{$2} = $3 . $4; ""/eg;
  
      $self->render(json => { 'headers' => \%headers,
                              'body' => $a->body,
                              'headers_raw' => $a->headers,
                              'rest' => $headers
      });
   }


1
rocksolid light 0.6.6
clearnet i2p tor