Topic: 如何写这个操作文本文件的程序(csdn都没人会)

  Print this page

1.如何写这个操作文本文件的程序(csdn都没人会) Copy to clipboard
Posted by: feelyou
Posted on: 2008-03-14 23:15

要把一个文本文件的内容有选择、规则地读到另外一个文档里
例子:
Name: 1
Status:2
URL:3
Phase: 4
Category:5
Reference:6
Reference: 7
Reference: 8
<--这里是回车-->
a
b
=================================================

Name: 11
Status:22
Phase: 44
Category:55
Reference:66
Reference: 77
Reference:88
<--这里是回车-->
c
d
~~~~~~~~~~
那么导入文本文件的格式应该这样:
1,2,3,4,5,6.7.8,a.b
11,22,null,44,55.66.77,88,c.d
~~~~~~~~~~~~~~~
即把每行第一个冒号之后的内容保留,把两个记录之间的连等号和reference下面的回车都去掉,对应入相应的内容,有些记录内容未必一致的,欠的就用null代替

2.Re:如何写这个操作文本文件的程序(csdn都没人会) [Re: feelyou] Copy to clipboard
Posted by: feelyou
Posted on: 2008-03-14 23:18

要操作的文本文件部分内容如下:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Name: CVE-1999-0002
Status: Entry
Reference: SGI:19981006-01-I
Reference: URL:ftp://patches.sgi.com/support/free/security/advisories/19981006-01-I
Reference: CERT:CA-98.12.mountd
Reference: CIAC:J-006
Reference: URL:http://www.ciac.org/ciac/bulletins/j-006.shtml
Reference: BID:121
Reference: URL:http://www.securityfocus.com/bid/121
Reference: XF:linux-mountd-bo

Buffer overflow in NFS mountd gives root access to remote attackers,
mostly in Linux systems.

======================================================
Name: CVE-1999-0003
Status: Entry
Reference: NAI:NAI-29
Reference: CERT:CA-98.11.tooltalk
Reference: SGI:19981101-01-A
Reference: URL:ftp://patches.sgi.com/support/free/security/advisories/19981101-01-A
Reference: SGI:19981101-01-PX
Reference: URL:ftp://patches.sgi.com/support/free/security/advisories/19981101-01-PX
Reference: XF:aix-ttdbserver
Reference: XF:tooltalk
Reference: BID:122
Reference: URL:http://www.securityfocus.com/bid/122

Execute commands as root via buffer overflow in Tooltalk database
server (rpc.ttdbserverd).

======================================================
Name: CVE-1999-0004
Status: Candidate
URL: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-1999-0004
Phase: Modified (19990621-01)
Category: SF
Reference: CERT:CA-98.10.mime_buffer_overflows
Reference: XF:outlook-long-name
Reference: SUN:00175
Reference: MS:MS98-008
Reference: URL:http://www.microsoft.com/technet/security/bulletin/ms98-008.asp

MIME buffer overflow in email clients, e.g. Solaris mailtool
and Outlook.

Current Votes:
ACCEPTMusical Note Magdych, Northcutt, Wall, Baker, Landfield, Cole, Dik, Collins
MODIFY(1) Frech
NOOP(1) Christey
REVIEWING(1) Shostack

Voter Comments:
Frech> Extremely minor, but I believe e-mail is the correct term. (If you reject
this suggestion, I will not be devastated.) Smile
Christey> This issue seems to have been rediscovered in
BUGTRAQ:20000515 Eudora Pro & Outlook Overflow - too long filenames again
http://marc.theaimsgroup.com/?l=bugtraq&m=95842482413076&w=2

Also see
BUGTRAQ:19990320 Eudora Attachment Buffer Overflow
http://marc.theaimsgroup.com/?l=bugtraq&m=92195396912110&w=2
Christey>
CVE-2000-0415 may be a later rediscovery of this problem
for Outlook.
Dik> Sun bug 4163471,
Christey> ADDREF BID:125
Christey> BUGTRAQ:19980730 Long Filenames & Lotus Products
URL:http://marc.theaimsgroup.com/?l=bugtraq&m=90221104526201&w=2

======================================================
Name: CVE-1999-0005
Status: Entry
Reference: CERT:CA-98.09.imapd
Reference: SUN:00177
Reference: URL:http://sunsolve.sun.com/pub-cgi/retrieve.pl?doctype=coll&doc=secbull/177
Reference: BID:130
Reference: URL:http://www.securityfocus.com/bid/130
Reference: XF:imap-authenticate-bo

Arbitrary command execution via IMAP buffer overflow in authenticate
command.

3.Re:如何写这个操作文本文件的程序(csdn都没人会) [Re: feelyou] Copy to clipboard
Posted by: andy_wang_5
Posted on: 2008-03-16 17:52

只是解析字符串,没什么特殊的要求呀

4.Re:如何写这个操作文本文件的程序(csdn都没人会) [Re: feelyou] Copy to clipboard
Posted by: zjh1983314
Posted on: 2008-04-10 08:21

我觉得是没有人愿意回答

5.Re:如何写这个操作文本文件的程序(csdn都没人会) [Re: feelyou] Copy to clipboard
Posted by: JiafanZhou
Posted on: 2008-04-14 16:16

你自己作了什么呢?我们是来帮你解决你在做东西时候的问题,而不是来帮你做***课的。


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923