Skip to content

Instantly share code, notes, and snippets.

@numanturle
Created April 20, 2022 12:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save numanturle/e7c369a5eaa0b6ccbacdfb059b512161 to your computer and use it in GitHub Desktop.
Save numanturle/e7c369a5eaa0b6ccbacdfb059b512161 to your computer and use it in GitHub Desktop.
MalwareURLs download
$db_name = "MalwareURLs.txt"
if (!(Test-Path $db_name))
{
New-Item -name $db_name -type "file" -value
Write-Output "Created new file and text content added"
}
$url_list = @(
'https://raw.githubusercontent.com/mitchellkrogza/Phishing.Database/master/phishing-IPs-ACTIVE.txt',
'https://raw.githubusercontent.com/mitchellkrogza/Phishing.Database/master/phishing-links-ACTIVE.txt',
'https://phishing.army/download/phishing_army_blocklist.txt',
'https://openphish.com/feed.txt',
'https://raw.githubusercontent.com/mitchellkrogza/Phishing.Database/master/phishing-domains-ACTIVE.txt',
'https://raw.githubusercontent.com/emberstack/threat-feed/main/Feed/List/ThreatFeed.Domains.Generic.txt',
'https://hole.cert.pl/domains/domains.txt',
'https://kriskintel.com/feeds/ktip_malicious_domains.txt',
'https://www.usom.gov.tr/url-list.txt',
'https://kriskintel.com/feeds/ktip_malicious_Ips.txt',
'https://rescure.me/rescure_blacklist.txt',
'https://rescure.me/rescure_domain_blacklist.txt'
)
$new_list = @()
foreach ($url in $url_list) {
$useragent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36"
try {
Write-Output "[+] Download $($url)"
$output = Invoke-WebRequest -URI $url -UserAgent $useragent
$list_output = $output.Content -split "'n"
$new_list += $list_output
Write-Output "[+] Status Code -- $($output.StatusCode)"
} catch{
Write-Output "[!] Error download"
Write-Output "[*] Status Code --- $($_.Exception.Response.StatusCode.Value__) "
}
}
$new_list | Set-Content $db_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment