Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```$password = "*p4ss"
- $word = Get-content words.txt | get-random
- $word2 = get-content words.txt | get-random
- $username = "$word****$word2"
- $date = get-date -format MMddyyyyhhmm
- $email = "m41l"
- $pgpool = "1234"
- $accountdir = "4321"
- ###batch creation###
- ##start mailserver
- Write-Output starting
- Set-Location kinanmail
- cmd /c start.bat ###start java -jar kinanmail.jar |out-null
- Write-Output "beginning account creation"
- ##start account creation
- Set-Location C:\Users\Administrator\projects\enzicity\1
- ###preserves old result file if it exitsts
- if (Test-Path result.csv) {rename-item -path .\result.csv -newname ".\result$date.csv"}
- $count = read-host "amount of accounts to generate?"
- java -jar kinancore.jar -m $email -f $username -p $password -c $count -t 20 -s 2910
- Write-Output accounts created
- Write-Output formatting results
- ###formats results for pgpool
- get-content result.csv | select-string "^#.+" -notmatch | out-file temp.csv
- $outlist = Import-Csv temp.csv -Header name,pass,mail,bd,us,ok -Delimiter (';')| where-object {$_.ok -ne "error"}
- $File = $outlist | select-object @{name='ptc';expression={'ptc'}},name,pass | convertto-csv -notypeinformation | ForEach-Object {$_ -replace '"', ""} | select-object -skip 1 | Out-File -encoding utf8 accounts.csv -append
- ## ensures that theres no trailing line break
- $dir = get-location
- $file = "$dir\account.csv"
- $in = [System.IO.File]::OpenText($file)
- $text = ($in.readtoend()).trim("`r`n")
- $in.close()
- $stream = [System.IO.StreamWriter]$file
- $stream.write($text)
- $stream.close()
- move-item accounts.csv $Accountdir/account$date.csv
- set-location $pgpool
- Write-Host -NoNewLine 'your account file may can be found at $accountdir/accounts$date.csv, press any key to exit....';
- $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown');
- python pgpool-import.py -i accounts.csv -cnd good -l 1
- Write-Host -NoNewLine 'your account file may can be found at accounts.csv, press any key to exit....';
- $null = $Host.UI.RawUI.ReadKey('NoEcho,IncludeKeyDown');```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement