473,587 Members | 2,494 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

my newsgroup base database. (test)

#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Project: Network News Transport Protocol Server Program
Description:
基于数据库 的新闻组, 实现BBS前端 使用NNTP协 来访问贴*
Reference:
NNTP协议: http://www.mibsoftware.com/userkt/0099.htm
*则表达式 :
http://wiki.woodpecker.org.cn/moin/R...de24613d941e9d

-------------------------------------------------------------------------
python-chinese
Post: send py************@ lists.python.cn
Subscribe: send subscribe to py************* *******@lists.p ython.cn
Unsubscribe: send unsubscribe to
py************* *******@lists.p ython.cn
Detail Info: http://python.cn/mailman/listinfo/python-chinese
-------------------------------------------------------------------------
"""

import sys
import socket
import threading
import time
import asyncore, asynchat
import string, StringIO, re
#from netkiller import *
#import testMessages
from messages import Messages

#print Messages.banner

class nntp_server (asyncore.dispa tcher):

channel_counter = 0

def __init__ (self, host, port):
asyncore.dispat cher.__init__ (self)
self.create_soc ket (socket.AF_INET , socket.SOCK_STR EAM)
self.set_reuse_ addr()
self.there = (host, port)
self.bind (self.there)
self.listen (5)
def handle_connect( self):
pass
def handle_accept (self):
conn, addr = self.accept()
nntp_receiver (self, (conn, addr))
def handle_error(se lf):
pass
def handle_close (self):
self.close()

class nntp_receiver (asynchat.async _chat):

def __init__ (self, server, (conn, addr)):
asynchat.async_ chat.__init__ (self, conn)
self.set_termin ator ('\r\n')
self.server = server
self.server.cha nnel_counter = self.server.cha nnel_counter + 1
self.id = self.server.cha nnel_counter
#self.sender = nntp_sender (self, server.there)
#self.sender.id = self.id
self.buffer = ''
self.handle_con nect()
self.current_gr oup = group_selected( None)
def handle_connect (self):
if self.connected :
self.push(Messa ges.banner)

def collect_incomin g_data (self, data):
self.buffer = self.buffer + data

def found_terminato r (self):
data = self.buffer
self.buffer = ''
if self.get_termin ator() == '\r\n':
parse = self.isCommand( data)
if parse:
parse[0] = parse[0].lower()
self.log('comma nd:'+parse[0])
usenet(self,par se,self.current _group)
if parse[0] == 'post':
self.set_termin ator ('.\r\n')
if parse[0] == 'quit':
self.handle_clo se()
else:
usenet(self,['post',data],self.current_g roup)
self.set_termin ator ('\r\n')

message = '<== (%d) %s' % (self.server.ch annel_counter,
repr(data))
self.log(messag e)
#self.log('curr ent:'+self.curr ent_group.get_g roup())
#self.sender.pu sh (data + '\n')
def close_when_done ():
pass
def handle_close (self):
self.log('Closi ng')
self.server.cha nnel_counter = self.server.cha nnel_counter - 1
#self.sender.cl ose()
self.close()

def isCommand(self, data):
rcommand = (
r'^mode [reader|stream]',
r'^list$',r'^li st
[active|active.t imes|newsgroups |subscriptions]',
r'^xover [0-9]+-[0-9]+',
r'^newgroups [0-9]+ [0-9]+ ',
r'^group .+',
r'^newgroups [0-9]+ [0-9]+ [a-zA-Z]',
r'^head [0-9]+',
r'^body [0-9]+',
r'^article [0-9]+',
r'^post$',r'^ne xt$',r'^last$',
r'^ihave$',r'^s lave$',
r'^help$',r'^qu it$'
)
parse = []
for command in rcommand:
digs = re.compile(comm and,re.IGNORECA SE)
if digs.match(data ):
parse = data.split(' ')
return parse
self.push("500 command not recognized\r\n" )
return None
"""
class nntp_sender (asynchat.async _chat):

def __init__ (self, receiver, address):
asynchat.async_ chat.__init__ (self)
self.receiver = receiver
self.set_termin ator (None)
self.create_soc ket (socket.AF_INET , socket.SOCK_STR EAM)
self.buffer = ''
self.set_termin ator ('\n')
self.connect (address)

def handle_connect (self):
print 'Connected'

def collect_incomin g_data (self, data):
self.buffer = self.buffer + data

def found_terminato r (self):
data = self.buffer
self.buffer = ''
print '==(%d) %s' % (self.id, repr(data))
self.receiver.p ush (data + '\n')

def handle_close (self):
self.receiver.c lose()
self.close()
"""
class group_selected:
#current = None
def __init__(self,v alue):
self.set_group( value)
def set_group(self, value):
self.current = value
def get_group(self) :
return self.current

class usenet:
#threading.Thre ad
conn = None
addr = None
buffer = None
msg = None
conn = None
current_group = None
HELP = """\
HELP \r\n
100 Legal commands \r\n
authinfo user Name|pass Password \r\n
article [MessageID|Numbe r] \r\n
body [MessageID|Numbe r] \r\n
check MessageID \r\n
date \r\n
group newsgroup \r\n
head [MessageID|Numbe r] \r\n
help \r\n
ihave \r\n
last \r\n
list [active|active.t imes|newsgroups |subscriptions] \r\n
listgroup newsgroup \r\n
mode stream \r\n
mode reader \r\n
newgroups yymmdd hhmmss [GMT] [<distribution s>] \r\n
newnews newsgroups yymmdd hhmmss [GMT] [<distribution s>] \r\n
next \r\n
post \r\n
slave \r\n
stat [MessageID|Numbe r] \r\n
takethis MessageID \r\n
xgtitle [group_pattern] \r\n
xhdr header [range|MessageID] \r\n
xover [range] \r\n
xpat header range|MessageID pat [morepat...] \r\n
.. \r\n"""

def __init__(self, conn,command,cu rrent_group):
self.conn = conn
self.buffer = buffer
self.msg = Messages()
self.current_gr oup = current_group
command[0] = command[0].lower()
self.commands(c ommand)
def welcome(self):
self.conn.send( self.msg.banner )
def commands(self, command):
if not buffer: return True
if command[0] == 'mode':
self.conn.push( self.msg.banner )
elif command[0] == 'list':
lists = self.msg.list()
length = str(len(lists))
self.conn.send( "215 list of newsgroups follows\r\n")
for group in lists:
self.conn.push( group+"\r\n")
self.conn.push( ".\r\n")
elif command[0] == 'group':
current = command[1]
isNone = self.msg.group( current)
if not isNone:
Responses(self. conn,411)
else:
self.current_gr oup.set_group(c urrent)
number,first,la st,group = isNone
self.conn.push( "211 " +number+' '+first+' '+last+'
'+group+ " selected\r\n")
elif command[0] == 'newgroups':
#newgroups = self.msg.newgro ups(950803,1927 08,'GMT')
#length = len(newgroups)
self.conn.push( "231 list of new newsgroups follows.\r\n")
#for name in newgroups:
# self.conn.push( name+"\r\n")
self.conn.push( ".\r\n")
elif command[0] =='article':
MessageID = command[1]
text = self.msg.articl e(MessageID)
self.conn.push( "220 "+MessageID +"
<ma**********@l ists.mozilla.or garticle retrieved - head and body
follows\r\n")
self.conn.push( text)
self.conn.push( ".\r\n")
elif command[0] =='head':
MessageID = command[1]
self.conn.push( "221 "+MessageID +"
<ma**********@l ists.mozilla.or g>\r\n")
self.conn.push( ".\r\n")
elif command[0] =='body':
MessageID = command[0]
self.conn.push( "222 "+MessageID +"
<ma**********@l ists.mozilla.or g>\r\n")
self.conn.push( ".\r\n")
elif command[0] == 'xover':
if not self.current_gr oup.get_group() :
Responses(self. conn,412)
return
xover = command[1]
first, last = xover.split('-')
xovers = self.msg.xover( first,last)
#length = len(xovers)
self.conn.push( "224 xover information follows\r\n")
"""
412 no newsgroup has been selected
"""
for xover in xovers:
self.conn.push( xover + "\r\n")
self.conn.push( ".\r\n")
elif command[0] =='xhdr':
xhdr = command[1]
subject, range = xhdr.split(' ')
first, last = range.split('-')
self.msg.xhdr(' subject',first, last)
#length = len(xover_list)
self.conn.push( "221 "+subject+" field follows\r\n")
for xo in xover_list:
self.conn.send( xo + "\r\n")
self.conn.send( ".\r\n")
elif command[0] == 'post':
if len(command) == 1:
self.conn.push( "340 send article\r\n")
elif len(command) == 2:
data = command[1]
self.msg.post(d ata)
Responses(self. conn,240)
elif command[0] == 'rset':
self.conn.push( "250 OK\r\n")
elif command[0] =='help':
self.conn.push( self.HELP)
elif command[0] =='quit':
self.conn.push( "205 closing connection - goodbye!\r\n")
return True

def close(self):
self.conn.close ()
self.buffer = None
self.conn = None
self.addr = None

class Responses:
conn = None
def __init__(self,c onn,status):
self.conn = conn
if status == 205:
pass
elif status == 224:
self.conn.push( '224 Overview information follows\r\n')

elif status == 240:
self.conn.push( '240 article posted ok\r\n')
elif status == 340:
self.conn.push( '340 send article to be posted. End with
<CR-LF>.<CR-LF>\r\n')
elif status == 411:
self.conn.push( '411 no such news group\r\n')
elif status == 412:
self.conn.push( '412 No news group current selected\r\n')
elif status == 420:
self.conn.push( '420 No article(s) selected\r\n')

elif status == 440:
self.conn.push( '440 posting not allowed\r\n')
elif status == 441:
self.conn.push( '441 posting failed\r\n')
elif status == 502:
self.conn.push( '502 no permission\r\n' )

def main():
try:
nntpd = nntp_server('12 7.0.0.1',119)
asyncore.loop()
except KeyboardInterru pt:
print "Crtl+C pressed. Shutting down."
if __name__ == '__main__':
main()

Jul 4 '06 #1
2 2421

Netkiller 写道:
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Project: Network News Transport Protocol Server Program
Description:
基于数据库 的新闻组, 实现BBS前端 使用NNTP协 来访问贴*

import sys,re
import MySQLdb

class NewsDB:
conn = None
cursor = None
def connect(self):
try:
conn = MySQLdb.connect (host = "localhost" ,
user = "root",
passwd = "chen",
db = "usenet")
except MySQLdb.Error, e:
print "Error %d: %s" % (e.args[0], e.args[1])
sys.exit (1)
def fetchone(self,s ql):
self.connect()
self.cursor = conn.cursor ()
self.cursor.exe cute (sql)
row = self.cursor.fet chone ()
#print "server version:", row[0]
self.close()
return row
def fetchall(self):
self.connect()
self.cursor = conn.cursor ()
self.cursor.exe cute (sql)
all = self.cursor.fet chall ()
#print "server version:", row[0]
self.close()
return all
def close(self):
self.cursor.clo se ()
self.conn.close ()
class abstract:
subject = None
mail_from = None
rcpt_to = None
data = None

group = ""

grouplist = (
("cn.comp.linux ", 5, 2, "y"),
("cn.comp.freeb sd", 3, 2, "y"),
("cn.comp.do s", 10, 4, "y"),
("cn.test", 5, 2, "y"),
("comp.lang.pyt hon", 5, 2, "y")
)
def welcome(self):
return 'Welcome'
def list (self):
lists = []
for name, last, first, mode in self.grouplist:
lists.append(na me+ " " + str(last) + " " + str(first) +" "+
mode)
return lists
def group(self,grou pname):
group_rang = ""
for name, last, first, mode in self.grouplist:
if name == groupname:
group_rang = str(last - first)+" "+ str(first)+"
"+str(last)
break
return group_rang
def xover(self,firs t,last):
xover_tmp = []
xover_tmp.appen d("""2 Mozilla programmer needed for
children's learning program "John Fodor, PhD" <fo***@ilt-inc.com>
Mon, 23 Jan 2006 12:01:09 -0500
<ma************ *************** ***@lists.mozil la.org 10532
276 Xref: number1.nntp.dc a.giganews.com mozilla.jobs:2" "")
xover_tmp.appen d("""3 mozilla expert needed "Paul
Sponagl" <sp*****@7val.c om Tue, 7 Mar 2006 20:00:52 +0100
<ma************ *************** *****@lists.moz illa.org 2913
41 Xref: number1.nntp.dc a.giganews.com mozilla.jobs:10 """)
return xover_tmp
def head(self):
self.xover(firs t,last)
def xhdr(self,first ,last):
xover_tmp = []
xover_tmp.appen d('1 HI "NNTP.HK"
<ad***@nntp.h k 14 Jun 2006 14:43:05 +0800
<44********@new s.nntp.hk 1151 31 Xref:
news.nntp.hk vip.cicefans:1\ r\n')
return xover_tmp
def newgroups(self, data,time,gmt):
lists = []
lists.append("c n.test.os")
lists.append("c n.test.qa")
return lists

class Messages(abstra ct):
banner = '200 \"Welcome to Netkiler News server\"\r\n'
conn= None
def __init__(self):

#self.db=_mysql .connect(host=" localhost",user ="root",passwd= "chen",db="usen et")

self.conn=MySQL db.connect(host ="localhost",us er="root",passw d="chen",db="us enet")
def list (self):
sql = """SELECT id,`group`,(sel ect max(Number) from article) as
last, (select min(Number) from article) as first, p FROM list"""
#print sql
self.conn.query (sql)
result=self.con n.use_result()
group = []
for id, name, last, first, mode, in result.fetch_ro w(10):
group.append(na me+ " " + str(last) + " " + str(first) +" "+
mode)
return group
def group(self,news group):
sql = "SELECT `group`,(select count(Number) from article) as
number, (select max(Number) from article) as last, (select min(Number)
from article) as first FROM list where `group` = '%s' limit 1" %
(newsgroup)
#print sql
self.conn.query (sql)
result=self.con n.use_result()
#print result.fetch_ro w();
for name, number, last, first in result.fetch_ro w():
return (str(number),st r(first),str(la st),name)
def xover(self,firs t,last):
sql = "select * from article where Number BETWEEN %s AND %s" %
(first,last)
#print sql
cursor =self.conn.curs or()
cursor.execute( sql)
xovers = []
for Number, MessageID, Body, Date in cursor.fetchall ():
parse = self.parseArtic le(Body)
if 'Xref' in set(parse):
xref = '\t'+parse['Xref']
else:
xref = ''
if 'Lines' in set(parse):
lines = '\t'+parse['Lines']
else:
lines = ''

xovers.append(s tr(Number)+'\t' +parse['Subject']+'\t'+parse['From']+'\t'+parse['Date']+'\t<3d******@n etkiller.hikz.c om>\t'+str(len( Body))+'\t'+lin es+xref)
cursor.close ()
return xovers
def post(self,text) :
sql = "insert into article(body, `date`) values('%s',now ())" %
(text)
#print sql
cursor =self.conn.curs or()
cursor.execute( sql)
self.conn.commi t()
cursor.close ()
#self.conn.clos e ()
#print "%d rows were updated" % cursor.rowcount
return cursor.rowcount
def article(self,id ):
sql = "select * from article where Number='%s'" % (id)
#print sql
cursor =self.conn.curs or()
cursor.execute( sql)
#print cursor.fetchone ();
row = cursor.fetchone ()
# for Number, MessageID, Message, Date in cursor.fetchone ():
# cursor.close ()
return row[2]
def head(self,id):
sql = "select * from article where Number='%s'" % (id)
#print sql
cursor =self.conn.curs or()
cursor.execute( sql)
#print cursor.fetchone ();
row = cursor.fetchone ()
# for Number, MessageID, Message, Date in cursor.fetchone ():
# cursor.close ()
return row[2]
def body(self,id):
sql = "select * from article where Number='%s'" % (id)
#print sql
cursor =self.conn.curs or()
cursor.execute( sql)
#print cursor.fetchone ();
row = cursor.fetchone ()
# for Number, MessageID, Message, Date in cursor.fetchone ():
# cursor.close ()
return row[2]
def parseArticle(se lf,data):
"""
From: "NEO" <op******@163.c om>
Newsgroups: cn.test
Subject: test
Date: Fri, 30 Jun 2006 17:14:17 +0800
Lines: 3
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
"""
#[a-zA-z0-9]+@[a-zA-z0-9]+.[a-zA-z]+
matchs = (
('From', r'From: (.+ <.+>)\r\n'),
('Newsgroups', r'Newsgroups: (.+)\r\n'),
('Subject', r'Subject: (.+)\r\n'),
('Date', r'Date: (.+)\r\n'),
('Lines', r'Lines: (.+)\r\n'),
('X-Priority', r'X-Priority: (.+)\r\n'),
('X-MSMail-Priority', r'X-MSMail-Priority: (.+)\r\n'),
('X-Newsreader', r'X-Newsreader: (.+)\r\n'),
('X-MimeOLE', r'X-MimeOLE: (.+)\r\n'),
('X-RFC2646', r'X-RFC2646: (.+)\r\n'),
('MIME-Version', r'MIME-Version: (.+)\r\n'),
('User-Agent', r'User-Agent: (.+)\r\n'),
('Content-Type', r'Content-Type: (.+)\r\n'),
('Content-Transfer-Encoding', r'Content-Transfer-Encoding:
(.+)\r\n'),
('Xref', r'Xref: (.+)\r\n'),

('Body', r'\r\n\r\n(.+)\ r\n')
)
parse = {}
for head, value in matchs:
digs = re.compile(valu e,re.IGNORECASE )
for test in digs.findall(da ta):
parse[head] = test
return parse
def main():
test = Messages()
#print msg.banner
#print test.list()
#print test.group('cn. test')
print test.xover('25' , '50')
#nntp.post('tes t')
#delete from article;
#text = test.article('2 5')
#print repr(text)
#print '---------------------'
#print test.parseArtic le(text)
if __name__ == '__main__':
main()

Jul 4 '06 #2

Netkiller 写道:
Netkiller 写道:
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Project: Network News Transport Protocol Server Program
Description:
基于数据库 的新闻组, 实现BBS前端 使用NNTP协 来访问贴*


Database SQL Script follow:

-- phpMyAdmin SQL Dump
-- version 2.7.0-rc1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jul 04, 2006 at 02:47 PM
-- Server version: 4.1.18
-- PHP Version: 5.0.5
--
-- Database: `usenet`
--

-- --------------------------------------------------------

--
-- Table structure for table `article`
--

DROP TABLE IF EXISTS `article`;
CREATE TABLE IF NOT EXISTS `article` (
`Number` int(10) unsigned NOT NULL auto_increment,
`MessageID` varchar(255) NOT NULL default '',
`body` text NOT NULL,
`Date` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`Number`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT= 40 ;

--
-- Dumping data for table `article`
--

INSERT INTO `article` VALUES (25, '', 'From: "NEO"
<op******@163.c om>\r\nNewsgrou ps: cn.test\r\nSubj ect: test\r\nDate:
Fri, 30 Jun 2006 17:14:17 +0800\r\nLines: 3\r\nX-Priority:
3\r\nX-MSMail-Priority: Normal\r\nX-Newsreader: Microsoft Outlook
Express 6.00.2900.2180\ r\nX-MimeOLE: Produced By Microsoft MimeOLE
V6.00.2900.2180 \r\nX-RFC2646: Format=Flowed; Original\r\n\r\ ntest !
\r\n\r\n\r\n', '2006-06-30 17:14:17');
INSERT INTO `article` VALUES (26, '', 'Date: Tue, 04 Jul 2006 11:34:54
+0800\r\nFrom: My Usenet <op******@163.c om>\r\nUser-Agent: Thunderbird
1.5.0.4 (Windows/20060516)\r\nMI ME-Version: 1.0\r\nNewsgrou ps:
cn.test\r\nSubj ect: Re: aaaaaa\r\nConte nt-Type: text/plain;
charset=ISO-8859-1; format=flowed\r \nContent-Transfer-Encoding:
7bit\r\n\r\n wrote:\r\ntest ! \r\n\r\n\r\n-------------\r\n',
'2006-07-04 11:34:54');
INSERT INTO `article` VALUES (27, '', 'Date: Tue, 04 Jul 2006 13:57:07
+0800\r\nFrom: My Usenet <op******@163.c om>\r\nUser-Agent: Thunderbird
1.5.0.4 (Windows/20060516)\r\nMI ME-Version: 1.0\r\nNewsgrou ps:
cn.test\r\nSubj ect: bbbbbb\r\nConte nt-Type: text/plain;
charset=ISO-8859-1; format=flowed\r \nContent-Transfer-Encoding:
7bit\r\n\r\nbbb bbbbbbbb\r\n', '2006-07-04 13:57:07');
INSERT INTO `article` VALUES (28, '', 'Date: Tue, 04 Jul 2006 13:58:17
+0800\r\nFrom: My Usenet <op******@163.c om>\r\nUser-Agent: Thunderbird
1.5.0.4 (Windows/20060516)\r\nMI ME-Version: 1.0\r\nNewsgrou ps:
cn.test\r\nSubj ect: Re: bbbbbb\r\nConte nt-Type: text/plain;
charset=ISO-8859-1; format=flowed\r \nContent-Transfer-Encoding:
7bit\r\n\r\nMy Usenet wrote:\r\nbbbbb bbbbbb\r\n', '2006-07-04
13:58:17');
INSERT INTO `article` VALUES (29, '', 'Date: Tue, 04 Jul 2006 14:28:00
+0800\r\nFrom: My Usenet <op******@163.c om>\r\nUser-Agent: Thunderbird
1.5.0.4 (Windows/20060516)\r\nMI ME-Version: 1.0\r\nNewsgrou ps:
cn.test\r\nSubj ect: cccccc\r\nConte nt-Type: text/plain;
charset=ISO-8859-1; format=flowed\r \nContent-Transfer-Encoding:
7bit\r\n\r\nccc ccc\r\n', '2006-07-04 14:28:00');
INSERT INTO `article` VALUES (30, '', 'Date: Tue, 04 Jul 2006 14:29:02
+0800\r\nFrom: My Usenet <op******@163.c om>\r\nUser-Agent: Thunderbird
1.5.0.4 (Windows/20060516)\r\nMI ME-Version: 1.0\r\nNewsgrou ps:
cn.test\r\nSubj ect: Re: cccccc My Usenet
<op******@163.c om>\r\nContent-Type: text/plain; charset=ISO-8859-1;
format=flowed\r \nContent-Transfer-Encoding: 7bit\r\n\r\nTue wrote:\r\n>
cccccc\r\n', '2006-07-04 14:29:02');
INSERT INTO `article` VALUES (31, '', 'Date: Tue, 04 Jul 2006 14:29:22
+0800\r\nFrom: My Usenet <op******@163.c om>\r\nUser-Agent: Thunderbird
1.5.0.4 (Windows/20060516)\r\nMI ME-Version: 1.0\r\nNewsgrou ps:
cn.test\r\nSubj ect: Re: cccccc My Usenet\r\nConte nt-Type: text/plain;
charset=ISO-8859-1; format=flowed\r \nContent-Transfer-Encoding:
7bit\r\n\r\nTue wrote:\r\nTue wrote:\r\n>cccc cc\r\n', '2006-07-04
14:29:22');
INSERT INTO `article` VALUES (32, '', 'Date: Tue, 04 Jul 2006 14:29:55
+0800\r\nFrom: My Usenet <op******@163.c om>\r\nUser-Agent: Thunderbird
1.5.0.4 (Windows/20060516)\r\nMI ME-Version: 1.0\r\nNewsgrou ps:
cn.test\r\nSubj ect: ddddd\r\nConten t-Type: text/plain;
charset=ISO-8859-1; format=flowed\r \nContent-Transfer-Encoding:
7bit\r\n\r\nddd dd\r\n', '2006-07-04 14:29:55');
INSERT INTO `article` VALUES (33, '', 'Date: Tue, 04 Jul 2006 14:31:32
+0800\r\nFrom: My Usenet <op******@163.c om>\r\nUser-Agent: Thunderbird
1.5.0.4 (Windows/20060516)\r\nMI ME-Version: 1.0\r\nNewsgrou ps:
cn.test\r\nSubj ect: Re: dddddMy Usenet
<op******@163.c om>\r\nContent-Type: text/plain; charset=ISO-8859-1;
format=flowed\r \nContent-Transfer-Encoding: 7bit\r\n\r\nTue wrote:\r\n>
ddddd\r\n', '2006-07-04 14:31:32');
INSERT INTO `article` VALUES (34, '', 'Date: Tue, 04 Jul 2006 14:31:45
+0800\r\nFrom: My Usenet <op******@163.c om>\r\nUser-Agent: Thunderbird
1.5.0.4 (Windows/20060516)\r\nMI ME-Version: 1.0\r\nNewsgrou ps:
cn.test\r\nSubj ect: Re: bbbbbb\r\nConte nt-Type: text/plain;
charset=ISO-8859-1; format=flowed\r \nContent-Transfer-Encoding:
7bit\r\n\r\nMy Usenet wrote:\r\nbbbbb bbbbbb\r\n', '2006-07-04
14:31:45');
INSERT INTO `article` VALUES (35, '', 'Date: Tue, 04 Jul 2006 14:32:04
+0800\r\nFrom: My Usenet <op******@163.c om>\r\nUser-Agent: Thunderbird
1.5.0.4 (Windows/20060516)\r\nMI ME-Version: 1.0\r\nNewsgrou ps:
cn.test\r\nSubj ect: cccccc\r\nConte nt-Type: text/plain;
charset=ISO-8859-1; format=flowed\r \nContent-Transfer-Encoding:
7bit\r\n\r\nccc ccc\r\n', '2006-07-04 14:32:04');
INSERT INTO `article` VALUES (36, '', 'Date: Tue, 04 Jul 2006 14:32:15
+0800\r\nFrom: My Usenet <op******@163.c om>\r\nUser-Agent: Thunderbird
1.5.0.4 (Windows/20060516)\r\nMI ME-Version: 1.0\r\nNewsgrou ps:
cn.test\r\nSubj ect: Re: cccccc\r\nConte nt-Type: text/plain;
charset=ISO-8859-1; format=flowed\r \nContent-Transfer-Encoding:
7bit\r\n\r\nMy Usenet wrote:\r\nccccc c\r\n', '2006-07-04 14:32:15');
INSERT INTO `article` VALUES (37, '', 'Date: Tue, 04 Jul 2006 14:32:18
+0800\r\nFrom: My Usenet <op******@163.c om>\r\nUser-Agent: Thunderbird
1.5.0.4 (Windows/20060516)\r\nMI ME-Version: 1.0\r\nNewsgrou ps:
cn.test\r\nSubj ect: Re: cccccc\r\nConte nt-Type: text/plain;
charset=ISO-8859-1; format=flowed\r \nContent-Transfer-Encoding:
7bit\r\n\r\nMy Usenet wrote:\r\nccccc c\r\n', '2006-07-04 14:32:18');
INSERT INTO `article` VALUES (38, '', 'Date: Tue, 04 Jul 2006 14:32:26
+0800\r\nFrom: My Usenet <op******@163.c om>\r\nUser-Agent: Thunderbird
1.5.0.4 (Windows/20060516)\r\nMI ME-Version: 1.0\r\nNewsgrou ps:
cn.test\r\nSubj ect: Re: cccccc\r\nConte nt-Type: text/plain;
charset=ISO-8859-1; format=flowed\r \nContent-Transfer-Encoding:
7bit\r\n\r\nMy Usenet wrote:\r\nccccc c\r\n', '2006-07-04 14:32:26');
INSERT INTO `article` VALUES (39, '', 'Date: Tue, 04 Jul 2006 14:32:32
+0800\r\nFrom: My Usenet <op******@163.c om>\r\nUser-Agent: Thunderbird
1.5.0.4 (Windows/20060516)\r\nMI ME-Version: 1.0\r\nNewsgrou ps:
cn.test\r\nSubj ect: Re: cccccc\r\nConte nt-Type: text/plain;
charset=ISO-8859-1; format=flowed\r \nContent-Transfer-Encoding:
7bit\r\n\r\nMy Usenet wrote:\r\nccccc c\r\n', '2006-07-04 14:32:32');

-- --------------------------------------------------------

--
-- Table structure for table `list`
--

DROP TABLE IF EXISTS `list`;
CREATE TABLE IF NOT EXISTS `list` (
`id` int(10) unsigned NOT NULL auto_increment,
`group` varchar(255) NOT NULL default '',
`last` varchar(10) NOT NULL default '',
`first` varchar(10) NOT NULL default '',
`p` char(1) default 'y',
`date` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='RFC977 3.6.1. LIST'
AUTO_INCREMENT= 3 ;

--
-- Dumping data for table `list`
--

INSERT INTO `list` VALUES (1, 'cn.test', '10', '5', 'y', '0000-00-00
00:00:00');
INSERT INTO `list` VALUES (2, 'cn.comp.os', '10', '5', 'y', '2006-06-27
00:00:00');

Jul 4 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2504
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/newsgroup-faq Posting-Frequency: twice a week (mondays and thursdays) Last-modified: March 10, 2001 Version: 1.95 URL: http://css.nu/faq/ciwas-mFAQ.html Maintainer: Jan Roland Eriksson <rex@css.nu> comp.infosystems.www.authoring.stylesheets FAQ v1.95 ______________________________________________________________________
2
2723
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/newsgroup-faq Posting-Frequency: once a week Last-modified: 2004-07-26 Version: 2.00 URL: <http://css.nu/faq/ciwas-mFAQ.html> Maintainer: Jan Roland Eriksson <rex@css.nu> comp.infosystems.www.authoring.stylesheets meta-FAQ v2.00 _______________________________________________________________________
0
1639
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/newsgroup-faq Posting-Frequency: once a week Last-modified: 2004-07-26 Version: 2.00 URL: <http://css.nu/faq/ciwas-mFAQ.html> Maintainer: Jan Roland Eriksson <rex@css.nu> comp.infosystems.www.authoring.stylesheets meta-FAQ v2.00 _______________________________________________________________________
0
2083
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/newsgroup-faq Posting-Frequency: once a week Last-modified: 2004-07-26 Version: 2.00 URL: <http://css.nu/faq/ciwas-mFAQ.html> Maintainer: Jan Roland Eriksson <rex@css.nu> comp.infosystems.www.authoring.stylesheets meta-FAQ v2.00 _______________________________________________________________________
20
2874
by: modemer | last post by:
Question is as in subject. For example: class BaseClass { public: void func() { do something; } // I don't want this function being overloaded in its inherited class };
7
2839
by: Lian | last post by:
Hi every body I have a problem with accesses and visual studio. I've just installed XP and I can't get a connection with the Data base. I have this error and I don't know how to fix it The Microsoft Jet database engine cannot open the file 'C:\Inetpub\wwwroot\Manufactor\DBManufactor\dbmanufactor.mdb'. It is already opened exclusively by another user, or you need permission to view its data. Description: An unhandled exception occurred...
11
2386
by: anongroupaccount | last post by:
What measures should be taken to avoid this sort of thing? class Base { }; class Derived1 : public Base { private: int i, j, k;
4
2936
by: softwaredoug | last post by:
Here is some test code I've been attempting to compile (Visual Studio 2003) test.h: class Base { protected: Base() {} public:
10
2314
by: Alex Snast | last post by:
hello I'm trying to implement a copy constructor for a vector of pointers to a base class (which is abstract) My question is how would i know what kind of new type should i allocate since the base poiner can have multipull meanings. i know i can use dynamic_cast however i really don't like this solution and i was wondering is i can do something better
0
7924
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8219
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7978
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8221
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
3845
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1192
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.