⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stegparty.1

📁 基于图象的信息隐藏的C源码
💻 1
字号:
.TH STEGPARTY 1 "04 Nov 1999" "0.2".UC 4.SH NAMEstegparty - tools for hiding data in plain-text files.SH SYNOPSIS.B stegparty.RB [ \-v [ v ]].B \-c.I secretfile.B \-i.I carrierfile>.I codedfile.PP.B stegparty \-d.RB [ \-v [ v ]].B \-i.I codedfile>.I secretfile.SH DEFINITION"Steganography is the art and science of communicating in a waywhich hides the existence of the communication. In contrast to cryptography,where the enemy is allowed to detect, intercept and modify messages withoutbeing able to violate certain security premises guaranteed by acryptosystem, the goal of steganography is to hide messages inside otherharmless messages in a way that does not allow any enemy to even detect thatthere is a second secret message present" [Markus Kuhn]..SH DESCRIPTION.I StegPartyis a system for hiding information inside of plain-text files. Unlike similar tools currently available, it does not use random gibberishto encode data -- it relies on small alterations to the message, likechanges to spelling and punctuation.  Because of this you can use anyplain-text file as your .I carrier, and it will be more-or-lessunderstandable after the secret message is embedded..PP.I StegPartyalso does not by default use whitespace to encode data.  This isbecause whitespace-encoded messages are too easy to detect, and too easy toalter so as to destroy the encoded message.  But since.I StegParty is customizable, you can add this feature if you want..PPOne caveat: because these are "small" alterations, the amount of encodeddata per unit of carrier text is typically small.  For instance, a 4K binaryfile just barely fits into Lewis Carroll's.IR "Through The Looking Glass" .You can improve on this by adding more rules, or writing more text thattakes advantage of these rules in your messages..PPAt the heart of .I StegPartyis the.IR "rules file" .This defines all the transformations that can occur on the plain-text message, called a.IR "carrier file" .Each rule consists of a.I rule type(whole word, literal, orexpression) and a set of substitutions. There can be arbitrarily many rulesin the rules file (up to the limits of your system and of flex)..PPThe encoding process works like this: the carrier file is scanned, and whena rule is matched, a substitution is made based on the value x mod n, wherex is the secret message, and n is the number of substitutions in the currentrule.  Then x is set to x/n, and the scanning continues until the secretmessage is exhausted, or until the end-of-file is reached..PPThe decoding process is similar -- the encoded file is scanned, and when arule is matched, the program determines which substitution was made.  Theindex of the substitution times a factor f is added to the secret message. The factor f starts at 1, and is multiplied by n (the number ofsubstitutions) every time a rule is matched..PPThe default rules file encodes your text in the style of the average Net-Lamer,using various emoticons, mispellings, mangling of contractions,and lame alterations such as "thanx" and "l8ter".  It could be improved upon using a suitable corpus, such as an IRC log..SH MAKING THE CODECTo make the default encoder, just type .BR make .This will make a binary.B stegpartyusing the rules in .BR stegparty.rulez .To build encoders withdifferent rules, create another rules file of the format .B <foo>.rulezand then type.BR "make <foo>" ..PPNOTE: The default Makefile requires GNU Make, so you'll need to type.B gmakeor.B gnumakeon some systems..SH THE RULES FILEThe rules file consists of.I rule definitionsseparated by blank lines.  Each rule definition begins with a.I rule format string, and is followed by the substitutions for that rule..PPLet's look at an example rules file:.nfwI'mi'mImwcain'taintlK|</("anks"|"anx")/[[:space:]]anksanx//[[:alpha:]]!{1,4}/[[:space:]]!!!!!!!!!!.fiThe first rule is a whole word rule, because the first line begins with a"w".  This means that the three strings "I'm", "i'm", and "Im" will match alone word, not as part of a substring (NOTE: see .B BWORDand.B EWORDin the lex file for the definition of the boundaries of a word)..PPThe second rule is also a whole word rule, but has the "c" modifier, whichmeans that it will also match the capitalized versions of the substitution words.Thus "Ain't", "Aint", "ain't" and "aint" will match, giving a total of foursubstitutions..PPThe third rule is a literal "l" rule, which means it will match anywhere inthe text, even inside of words.  Use this rule with caution, it can be trickyto implement properly!.PPThe fourth and fifth rule are expression rules, and they take the form ofone or two slashes followed by a lex expression.  The first rule matches"anks" or "anx" followed by whitespace, and the second rule matches betweenone and four '!' characters with a letter on the left side and whitespace onthe right..PPNote the additional slash before the [[:space:]] definition -- this means"match everything after this slash, but leave it alone if you replace it".Do a .B man lexif you need more elucidation..PPIn the fifth rule, we have a double slash "//".  This means "if you replacethis string, leave the first character alone".  In this example, we match thealphabetic character, but don't want to replace it.  Note that we also usean additional slash to ignore the trailing whitespace..SH OPTIONS.TP 12.B \-dDecode - extract data from a previously encoded message..TP.B \-cIn convert mode, specify the file to be encoded in the message.Can be text, usually will be binary..TP.B \-iSpecify the input file -- the carrier file to be encoded or decoded.If none is given, assumes stdin..TP.B \-oSpecify the output file.  If none given, assumes stdout..TP.B \-ENo Early-out - if this is given in encode mode, the entire carrier filewill be processed, even after the program runs out of data to encode.The default behavior is to stop after data is exhausted.Generally, you want to use this for data encoded with the.I base27command, or other data that is sensitive to trailing garbage.You don't need it if you're encoding gzip'ed files..SH NOTESThe nature of the decoding process is such that the decoder can't tell whenthe end of the secret message is reached -- it spews data until reaching theend of the carrier file.  If you encode data using gzip, this shouldn't bea problem -- gzip ignores trailing garbage..PPBecause I'm lazy, I didn't use a big-integer library -- I do stuff in chunksof 32 bits, which means that there can be some loss of efficiency when usingrules with more than two substitutions (which is usually the case).  I couldhave used glib++'s Integer class, but I don't like mixing annoying,bureaucratic C++ with beautiful, simple C.  Maybe I'll do one in Haskellnext..SH "SEE ALSO".PD.BR base27 (1),.BR pgp (1),.BR gzip (1),.BR bzip2 (1).ne 5.SH AUTHOR.RS 5.nfSteven Hugghugg@pobox.comhttp://pobox.com/~hugg/.fi.RE

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -