Skip to content

Commit 934708b

Browse files
author
Andriy Brukhovetskyy
committed
better exec check
1 parent e0944e9 commit 934708b

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

sflock/ident.py

-30
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,6 @@ def sct(f):
308308

309309

310310
def xxe(f):
311-
if is_executable(f):
312-
return None
313-
314311
STRINGS = [
315312
b"XXEncode",
316313
b"begin",
@@ -326,9 +323,6 @@ def xxe(f):
326323

327324

328325
def hta(f):
329-
if is_executable(f):
330-
return None
331-
332326
STRINGS = [
333327
b"<head",
334328
b"<title",
@@ -363,9 +357,6 @@ def office_one(f):
363357

364358

365359
def office_webarchive(f):
366-
if is_executable(f):
367-
return None
368-
369360
STRINGS = [
370361
b"<o:Pages>",
371362
b"<o:DocumentProperties>",
@@ -444,9 +435,6 @@ def office_ole(f):
444435

445436

446437
def powershell(f):
447-
if is_executable(f):
448-
return None
449-
450438
POWERSHELL_STRS = [
451439
b"$PSHOME",
452440
b"Get-WmiObject",
@@ -469,9 +457,6 @@ def powershell(f):
469457

470458

471459
def javascript(f):
472-
if is_executable(f):
473-
return None
474-
475460
JS_STRS = [
476461
b"var ",
477462
b"function ",
@@ -497,18 +482,12 @@ def javascript(f):
497482

498483

499484
def wsf(f):
500-
if is_executable(f):
501-
return None
502-
503485
match = re.search(b'<script\\s+language="(J|VB|Perl)Script"', f.contents, re.I)
504486
if match:
505487
return "wsf"
506488

507489

508490
def pub(f):
509-
if is_executable(f):
510-
return None
511-
512491
PUB_STRS = [
513492
b"Microsoft Publisher",
514493
b"MSPublisher",
@@ -523,9 +502,6 @@ def pub(f):
523502

524503

525504
def visualbasic(f):
526-
if is_executable(f):
527-
return None
528-
529505
VB_STRS = [
530506
b"Dim ",
531507
b"\x00D\x00i\x00m\x00 ",
@@ -575,9 +551,6 @@ def dmg(f):
575551

576552

577553
def vbe_jse(f):
578-
if is_executable(f):
579-
return None
580-
581554
if b"#@~^" in f.contents[:100]:
582555
data = vbe_decode_file("", f.contents)
583556
if data:
@@ -597,9 +570,6 @@ def udf(f):
597570

598571

599572
def inf(f):
600-
if is_executable(f):
601-
return None
602-
603573
STRINGS = [
604574
# b"[version]",
605575
b"Signature=",

0 commit comments

Comments
 (0)