MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / isZipFile

Function isZipFile

lib/core/common.py:1330–1343  ·  view source on GitHub ↗

Checks if file contains zip compressed content >>> isZipFile(paths.WORDLIST) True

(filename)

Source from the content-addressed store, hash-verified

1328 return hasattr(sys.stdin, "fileno") and not os.isatty(sys.stdin.fileno())
1329
1330def isZipFile(filename):
1331 """
1332 Checks if file contains zip compressed content
1333
1334 >>> isZipFile(paths.WORDLIST)
1335 True
1336 """
1337
1338 checkFile(filename)
1339
1340 with openFile(filename, "rb", encoding=None) as f:
1341 header = f.read(len(ZIP_HEADER))
1342
1343 return header == ZIP_HEADER
1344
1345def isDigit(value):
1346 """

Callers 2

dictionaryAttackFunction · 0.90
adjustMethod · 0.90

Calls 3

checkFileFunction · 0.85
openFileFunction · 0.85
readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…