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。