StringsSharp
1.0.0
แยกสตริงจากไฟล์ แพ็คเกจ Nuget พร้อมใช้งาน ตัวอย่างเป็นไฟล์ที่รวมอยู่ด้วย
ยูทิลิตี้ขนาดเล็กที่จะแยกสตริงจาก PE และไฟล์อื่น ๆ มีประโยชน์สำหรับมัลแวร์ analisis
คุณสามารถตั้งค่า pageCode, ช่วงอักขระ, ความยาวสตริงการสกัดขั้นต่ำและสูงสุด ดูตัวอย่างด้านล่าง
ไฟล์ขนาดใหญ่ถูกประมวลผลโดยการแยกมันออกเป็นชิ้นขนาดคงที่ ทุกชิ้นที่ตามมาซ้อนทับกันก่อนหน้านี้คือสตริงที่อยู่ที่ชายแดน Chunks จะไม่หายไป
มันมีความสามารถในการกรองผลลัพธ์ มันขึ้นอยู่กับไฟล์การกำหนดค่าที่มีนิพจน์ปกติ
// 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 เป็นพิเศษ