Changes
Jump to navigation
Jump to search
← Older edit
PowerShell
(edit)
Revision as of 07:55, 21 April 2022
441 bytes added
,
07:55, 21 April 2022
m
no edit summary
Line 1:
Line 1:
+
==Set environment variable==
+
<syntaxhighlight lang="powershell">
+
$env:DEBUG=$true
+
</syntaxhighlight>
+
+
== Download file ==
+
<syntaxhighlight lang="dos">
+
powershell "(new-object System.Net.WebClient).Downloadfile('http://<IP>/writeup.exe', 'writeup.exe')"
+
</syntaxhighlight>
+
==Execute code from web==
==Execute code from web==
<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 4:
Line 14:
</syntaxhighlight>
</syntaxhighlight>
−
==Modify Routing Table==
+
== Networking ==
+
+
=== Test Port open ===
+
<syntaxhighlight lang="powershell">
+
Test-NetConnection -ComputerName webproxy.global.basf.net -Port 8080
+
</syntaxhighlight>
+
+
=
==Modify Routing Table
=
==
<source lang="PowerShell">param([switch]$Elevated)
<source lang="PowerShell">param([switch]$Elevated)
function Check-Admin {
function Check-Admin {
Rafahsolis
Bureaucrats
,
Administrators
2,306
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version