StringsSharp
1.0.0
从文件中提取字符串。 Nuget软件包可用。示例包括文件。
小型实用程序将从PE和其他文件中提取字符串。对恶意软件肛门有用。
您可以设置Pagecode,字符范围,最小和最大提取字符串长度。请参阅下面的示例。
通过将它们拆分为固定尺寸的块来处理巨大的文件。随后的每个块重叠之前,IE弦上的弦将不会丢失
它具有过滤结果的能力。它基于配置文件,其中包含正则表达式。
// Desired file
string filename = "<filename>" ;
// Unicode. Char range: [u0020-u007E]. Min string length: 4. Max string length: 16
using ( StringsSharp . StringsSharp ss = new StringsSharp . StringsSharp ( 1200 , "[ u0020 - u007E ]" , 4 , 16 ) )
{
// Default chunk size is used
foreach ( MatchCollection matches in ss . Scan ( filename ) )
{
// Process matches here
}
}
// ASCII. Char range: [x20-x7E]. Min and string length are set to default
using ( StringsSharp . StringsSharp ss = new StringsSharp . StringsSharp ( 1251 , "[ x20 - x7E ]" ) )
{
using ( StringsSharp . StringFilter sf = new StringFilter ( configurationFile ) )
{
// Chunk size is set to 256
foreach ( MatchCollection matches in ss . Scan ( filename , 256 ) )
{
foreach ( Match match in matches )
{
// Result filtration in action
if ( sf . Scan ( match . Value ) )
{
// Process string here
}
foreach ( string regexpTag in sf . Scan ( match . Value ) )
{
// Process tags here
}
}
}
}
} 建立在VS 2017
特别感谢Ericzimmerman。