Updated Generate-CreditCards

master
Harley Lebeau 2019-02-14 14:08:35 -07:00 committed by GitHub
parent 226d72ec12
commit b07d3b9e84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 9 deletions

View File

@ -305,11 +305,10 @@ function Invoke-EgressAssess
{ {
$script:AllCC = @() $script:AllCC = @()
$script:list = New-Object System.Collections.Generic.List[System.String]
Write-Verbose "[*] Generating Credit Cards............."
$num = [math]::Round($Size * 10000 * 3) $num = [math]::Round($Size * 10000 * 3)
Write-Verbose "[*] Generating $Size MB of Credit Cards ($num)..."
$list = New-Object System.Collections.Generic.List[System.String]
$intCardType = 0 $intCardType = 0
for ($countercc = 0; $countercc -lt $num; $countercc++) for ($countercc = 0; $countercc -lt $num; $countercc++)
{ {
@ -346,16 +345,16 @@ function Invoke-EgressAssess
if ($randNumString.length -eq 15) if ($randNumString.length -eq 15)
{ {
$randCC = "$($randNumString.substring(0,4))-$($randNumString.substring(4,6))-$($randNumString.substring(10,5))" $randCC = "$($randNumString.substring(0,4))-$($randNumString.substring(4,6))-$($randNumString.substring(10,5))"
$script:list.Add($randCC) $list.Add($randCC)
} }
elseif ($randNumString.length -eq 16) elseif ($randNumString.length -eq 16)
{ {
$randCC = "$($randNumString.substring(0,4))-$($randNumString.substring(4,4))-$($randNumString.substring(8,4))-$($randNumString.substring(12,4))" $randCC = "$($randNumString.substring(0,4))-$($randNumString.substring(4,4))-$($randNumString.substring(8,4))-$($randNumString.substring(12,4))"
$script:list.Add($randCC) $list.Add($randCC)
} }
} }
$script:AllCC = $Script:list.ToArray() $script:AllCC = $list.ToArray()
$script:AllCC | Out-File C:\Users\ctrun\Desktop\test.txt $script:AllCC | Out-File CCData.txt
} }
function Generate-Identity function Generate-Identity
@ -2179,4 +2178,4 @@ function Invoke-EgressAssess
[System.GC]::Collect() [System.GC]::Collect()
Write-Verbose "[*] Exiting.." Write-Verbose "[*] Exiting.."
} }
} }