• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

Ruby [Ruby] ManProcess 0.1

Status
Not open for further replies.

Doddy

Leech
User
Joined
Apr 1, 2012
Messages
169
Reputation
0
Reaction score
406
Points
63
Credits
0
‎13 Years of Service‎
57%
Un simple programa para manejar los procesos en Windows.

Code:
>
#!usr/bin/ruby
#ManProcess 0.1
#Coded By Doddy H

require "win32ole"

def head()
 print "\n\n-- == Man Process 0.1 == --\n\n"
end

def copyright()
 print "\n\n(C) Doddy Hackman 2012\n\n"
 exit(1)
end

def retor()
 print "\n\n[+] Press any key to continue\n\n"
 gets.chomp
end

while 1
 head()
 print "1 - Show Process\n"
 print "2 - Close Process\n"
 print "3 - Exit\n\n\n"
 print "[+] Option : "
 op = gets.chomp
 if op == "1" 
   print "\n\n[+] Getting process...\n\n"
   nave = WIN32OLE.connect("winmgmts://")
   pro = nave.ExecQuery("select * from win32_process")
   pro.each do |po|
     print "[+] Name : ",po.Caption," [+] PID : ",po.ProcessId,"\n"
   end
   retor()

 elsif op == "2"
   print "\n\n[+] Name : "
   name = gets.chomp
   k = WIN32OLE.connect("winmgmts://")
   control = k.ExecQuery("select * from Win32_process where name='#{name}'")
   control.each do |pro|
     pro.Terminate
   end
   print "\n\n[+] Process Closed\n\n"
   gets.chomp
 elsif op == "3"
   copyright()
 else
   print "\n\n[-] Bad Option\n\n"
   retor()
 end
end


# The End ?
 
Status
Not open for further replies.
Back
Top