πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #78835

Re: AUTHINFO problem

#78835
From: Niz
Date: Sun, 16 Mar 2008 13:33
42 lines
2905 bytes
On 2008-03-16 13:09:34 +0000, Xavier Roche 
<xroche@free.fr.NOSPAM.invalid> said:

> Niz a Γ©crit :
>> Ah fantastic, I knew I must have been doing something stupid. I'll test 
>> it out now and see what happens.
> 
> You should also check the returncode of "AUTHINFO user <username>", 
> which shall be "381" to request the password. The "AUTHINFO pass 
> <password>" then returns either 281 ("OK"), or an error (typically 502)
> 
> Note: you should also send "\r\n" (rfc-style), and not "\n", as line 
> termination, even is most servers accept both formats.
> 
> See "Common NNTP Extensions",
> <http://www.ietf.org/rfc/rfc2980.txt>

Still having problems unfortunately. Here is my code, I have 
succesfully recieved the 480 code requesting authentification. Once the 
program recieves that it immediately runs the following function, but 
just hangs. I have removed the username and password for obvious 
reasons.

I've read up on all the RFC documents I can find but I'm at a loss. I 
never seem to get any data back from the server suggesting that the 
program never actually sends the data.

int nntpLogin(char *buffer, int bufsize, int sock)
{
	char loginName[] = "AUTHINFO USER <username>\r\n";
	char passwd[] = "AUTHINFO PASS <password>\r\n";
	
	send(sock, loginName, sizeof(loginName), 0);
	recv(sock, buffer, bufsize, 0);
	printf("%s", buffer);
	send(sock, passwd, sizeof(passwd), 0);
	recv(sock, buffer, bufsize, 0);
	printf("%s", buffer);

	return 0;
}
Technical Details
Message-ID: <2008031613334150073-niz@nicetrycom>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
References: <2008031611435716807-niz@nicetrycom> <frj1aj$7rt$1@news.trigofacile.com> <2008031613051775249-niz@nicetrycom> <frj662$mmf$1@news.httrack.net>

Show Full Headers
Complete Article Headers
Message-ID: <2008031613334150073-niz@nicetrycom>
Subject: Re: AUTHINFO problem
Date: Sun, 16 Mar 2008 13:33:41 +0000
From: Niz <niz@nicetry.com>
References: <2008031611435716807-niz@nicetrycom> <frj1aj$7rt$1@news.trigofacile.com> <2008031613051775249-niz@nicetrycom> <frj662$mmf$1@news.httrack.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sun, 16 Mar 2008 08:33:41 -0500
Newsgroups: news.software.nntp
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
User-Agent: Unison/1.8.1
Lines: 42
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-QdMSrQhxHhrn5a+0ndDM4VAfTHTZugn3HmEYRv0VIp3v85faGqIEH6bYIZNyDS0fb7Fn9n9obs/qxqh!yTu5eITFYgAYVmXuNCV2OyR49nAs1fHP9c5wnLjjfKdFci4+jHwcuC8tho+AOA==
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint
 properly
X-Postfilter: 1.3.37