Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function xmlWeirdAndroidEscape(original) {
let noAmps = replaceString(original, '&', '&');
let noLt = replaceString(noAmps, '<', '<');
let noGt = replaceString(noLt, '>', '>');
let noApos = replaceString(noGt, '"', '\\"');
return replaceString(noApos, "'", "\\'");
}
function xmlWeirdAndroidEscape(original) {
let noAmps = replaceString(original, '&', '&');
let noLt = replaceString(noAmps, '<', '<');
let noGt = replaceString(noLt, '>', '>');
let noApos = replaceString(noGt, '"', '\\"');
return replaceString(noApos, "'", "\\'");
}
function xmlWeirdAndroidEscape(original) {
let noAmps = replaceString(original, '&', '&');
let noLt = replaceString(noAmps, '<', '<');
let noGt = replaceString(noLt, '>', '>');
let noApos = replaceString(noGt, '"', '\\"');
return replaceString(noApos, "'", "\\'");
}
function xmlWeirdAndroidEscape(original) {
let noAmps = replaceString(original, '&', '&');
let noLt = replaceString(noAmps, '<', '<');
let noGt = replaceString(noLt, '>', '>');
let noApos = replaceString(noGt, '"', '\\"');
return replaceString(noApos, "'", "\\'");
}
function xmlWeirdAndroidEscape(original) {
let noAmps = replaceString(original, '&', '&');
let noLt = replaceString(noAmps, '<', '<');
let noGt = replaceString(noLt, '>', '>');
let noApos = replaceString(noGt, '"', '\\"');
return replaceString(noApos, "'", "\\'");
}
(async () => {
observer.next('Finding smali files...')
const smaliFiles = await globby(path.join(directoryPath, 'smali*/**/*.smali'))
let pinningFound = false
for (const filePath of smaliFiles) {
observer.next(`Scanning ${path.basename(filePath)}...`)
const originalContent = await fs.readFile(filePath, 'utf-8')
let patchedContent = originalContent
for (const signature of methodSignatures) {
patchedContent = replaceAll(
patchedContent,
signature,
`${signature}\n return-void`,
)
}
if (originalContent !== patchedContent) {
pinningFound = true
await fs.writeFile(filePath, patchedContent)
}
}
if (!pinningFound) task.skip('No certificate pinning logic found.')
observer.complete()
})()
})
function xmlWeirdAndroidEscape(original) {
let noAmps = replaceString(original, '&', '&');
let noLt = replaceString(noAmps, '<', '<');
let noGt = replaceString(noLt, '>', '>');
let noApos = replaceString(noGt, '"', '\\"');
return replaceString(noApos, "'", "\\'");
}
function xmlWeirdAndroidEscape(original) {
let noAmps = replaceString(original, '&', '&');
let noLt = replaceString(noAmps, '<', '<');
let noGt = replaceString(noLt, '>', '>');
let noApos = replaceString(noGt, '"', '\\"');
return replaceString(noApos, "'", "\\'");
}