Nathan Brink wrote:
> Dennis Peterson wrote:
>> Joel Richard wrote:
>>    
>>> This just bit in the behind real good. I'd like to propose a small
>>> change to the signatures.pdf document.
>>>
>>>     http://www.clamav.net/doc/latest/signatures.pdf
>>>
>>> There's an example that reads
>>>
>>>     z...@localhost:/tmp/test$  sigtool --hex-dump
>>>     How do I look in hex?
>>>     486f7720646f2049206c6f6f6b20696e206865783f0a
>>>
>>> This is a perfect example, but it needs to be noted in the document
>>> that if you are using this to create a snippet of hex-ed HTML as your
>>> signature that you need to strip the "0a" from the end of the encoded
>>> text.
>>>
>>>      
>> This also fails to represent the string because echo includes a line feed:
>>
>> echo "How do I look in hex?" |sigtool --hex-dump
>>
>> but this works:
>>
>> printf "How do I look in hex?" |sigtool --hex-dump
>>
>> There is no automatic linefeed with the printf command.
>>    
> There is an option for echo that removes the linefeed:
> ohnobi...@ohnopublishing ~/html/anindex $ echo -n "How do I look in 
> hex?" |sigtool --hex-dump
> 486f7720646f2049206c6f6f6b20696e206865783f
> 
> There is no reason to, but I prefer echo to printf. Maybe because printf 
> processes escapes such as ``%s'' and ``%%'':
> ohnobi...@ohnopublishing ~/html/anindex $ printf %%\\n
> %
> 
> Maybe you should include a warning note about how printf will eat 
> certain characters ;-).
> 

Let me know how that echo -n command works out for you in Solaris.

dp


_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

Reply via email to