Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Supported platforms
- Linux
- Windows
- On windows to install pywin32 is needed.Install version that matches the version of python installed ex: 32/64 bit. Download files to location of your choice.open a cmd prompt browse to directory that files are located. To run type "python setup.py". You will be prompted for credentials if you are not an admin. Artillery wil be installed in "Program Files (x86). After setup you have option to launch program. included is a batch file to launch once it is installed it is located in install directory.Console logging must be enabled in config.
- ********************************************artillary.py
- #!/usr/bin/python
- ################################################################################
- #
- # Artillery - An active honeypotting tool and threat intelligence feed
- #
- # Written by Dave Kennedy (ReL1K) @HackingDave
- #
- # A Binary Defense Project (https://www.binarydefense.com) @Binary_Defense
- #
- ################################################################################
- import time
- import sys
- # needed for backwards compatibility of python2 vs 3 - need to convert to threading eventually
- try: import thread
- except ImportError: import _thread as thread
- import os
- import subprocess
- from src.pyuac import * # added so that it prompts when launching from batch file
- #
- # Tested on win 7/8/10 also on kali rolling. left this here for when someone tries to launch this directly before using setup.
- if 'win32' in sys.platform:
- if not os.path.isfile("C:\Program Files (x86)\\Artillery\\artillery.py"):
- print("[*] Artillery is not installed, running setup.py..")
- import setup
- # subprocess.Popen("python setup.py", shell=True).wait()
- # consolidated nix* variants
- if ('linux' or 'linux2' or 'darwin') in sys.platform:
- if not os.path.isfile("/var/artillery/artillery.py"):
- print("[*] Artillery is not installed, running setup.py..")
- import setup
- # subprocess.Popen("python setup.py", shell=True).wait()
- # sys.exit()
- from src.core import *
- # from src.config import * # yaml breaks config reading - disabling
- if is_windows():#this is for launching script as admin from batchfile.
- if not isUserAdmin():# will prompt for user\pass and open in seperate window when you double click batchfile
- runAsAdmin()
- #removed below.These folders are created in setup.py
- #if not os.path.isdir("C:\\Program Files (x86)\\Artillery\\database"):
- #os.mkdir("C:\\Program Files (x86)\\Artillery\\database")
- if isUserAdmin():
- #moved for issue #39 BinaryDefense to only import on windows. seemed like best place
- #not the best way but for now something will go into eventlog.
- #for people with subscriptions in there environment like myself.
- #will work on better way
- from src.events import ArtilleryStartEvent
- # let the local(txt))logfile know artillery has started successfully
- write_log("[*] %s: Artillery has started successfully." % (grab_time()))
- # write to windows log to let know artillery has started
- ArtilleryStartEvent()
- #create temp datebase and continue
- if not os.path.isfile("C:\\Program Files (x86)\\Artillery\\database\\temp.database"):
- filewrite = open("C:\\Program Files (x86)\\Artillery\database\\temp.database", "w")
- filewrite.write("")
- filewrite.close()
- #consolidated nix* variants
- if is_posix():
- # Check to see if we are root
- try: # and delete folder
- if os.path.isdir("/var/artillery_check_root"):
- os.rmdir('/var/artillery_check_root')
- #if not thow error and quit
- except OSError as e:
- if (e.errno == errno.EACCES or e.errno == errno.EPERM):
- print ("[*] You must be root to run this script!\r\n")
- sys.exit(1)
- else:
- if not os.path.isdir("/var/artillery/database/"):
- os.makedirs("/var/artillery/database/")
- if not os.path.isfile("/var/artillery/database/temp.database"):
- filewrite = open("/var/artillery/database/temp.database", "w")
- filewrite.write("")
- filewrite.close()
- if is_config_enabled("CONSOLE_LOGGING"):
- print("[*] %s: Artillery has started successfully.\n[*] If on Windows Ctrl+C to exit. \n[*] Console logging enabled.\n" % (grab_time()))
- # prep everything for artillery first run
- check_banlist_path()
- try:
- # update artillery
- if is_config_enabled("AUTO_UPDATE"):
- thread.start_new_thread(update, ())
- # import base monitoring of fs
- if is_config_enabled("MONITOR"):
- from src.monitor import *
- # port ranges to spawn
- port = read_config("PORTS")
- # if we are running posix then lets create a new iptables chain
- if is_posix():
- time.sleep(2)
- create_iptables_subset()
- # start anti_dos
- import src.anti_dos
- # spawn honeypot
- import src.honeypot
- # spawn ssh monitor
- if is_config_enabled("SSH_BRUTE_MONITOR"):
- import src.ssh_monitor
- # spawn ftp monitor
- if is_config_enabled("FTP_BRUTE_MONITOR"):
- import src.ftp_monitor
- # start monitor engine
- import src.monitor
- # check hardening
- import src.harden
- # start the email handler
- import src.email_handler
- # check to see if we are a threat server or not
- if is_config_enabled("THREAT_SERVER"):
- thread.start_new_thread(threat_server, ())
- # recycle IP addresses if enabled
- if is_config_enabled("RECYCLE_IPS"):
- thread.start_new_thread(refresh_log, ())
- # pull additional source feeds from external parties other than artillery
- # - pulls every 2 hours or ATIF threat feeds
- thread.start_new_thread(pull_source_feeds, ())
- #removed turns out the issue was windows carriage returns in the init script i had.
- #note to self never edit linux service files on windows.doh
- #added to create pid file service would fail to start on kali 2017
- #if is_posix():
- # if not os.path.isfile("/var/run/artillery.pid"):
- # pid = str(os.getpid())
- # f = open('/var/run/artillery.pid', 'w')
- # f.write(pid)
- # f.close()
- # let the program to continue to run
- while 1:
- try:
- time.sleep(100000)
- except KeyboardInterrupt:
- print("\n[!] Exiting Artillery... hack the gibson.\n")
- sys.exit()
- #except sys.excepthook as e:
- # print("Excepthook exception: " + format(e))
- # pass
- except KeyboardInterrupt:
- sys.exit()
- except Exception as e:
- print("General exception: " + format(e))
- sys.exit()
- ****************************************************************artillery_start.bat
- :: script to start artillery
- @echo off
- python "C:\Program Files (x86)\Artillery\artillery.py"
- exit
- exit
- exit
- **************************************************************** config
- #############################################################################################
- #
- # This is the Artillery configuration file. Change these variables and flags to change how
- # this behaves.
- #
- # Artillery written by: Dave Kennedy (ReL1K)
- # Website: https://www.binarydefense.com
- # Email: info [at] binarydefense.com
- # Download: git clone https://github.com/binarydefense/artillery artillery/
- # Install: python setup.py
- #
- #############################################################################################
- #
- # DETERMINE IF YOU WANT TO MONITOR OR NOT
- MONITOR="ON"
- #
- # THESE ARE THE FOLDERS TO MONITOR, TO ADD MORE, JUST DO "/root","/var/", etc.
- MONITOR_FOLDERS="/var/www","/etc/"
- #
- # BASED ON SECONDS, 2 = 2 seconds.
- MONITOR_FREQUENCY="60"
- #
- # PORT 22 CHECK
- SSH_DEFAULT_PORT_CHECK="ON"
- #
- # EXCLUDE CERTAIN DIRECTORIES OR FILES. USE FOR EXAMPLE: /etc/passwd,/etc/hosts.allow
- EXCLUDE=""
- #
- # DO YOU WANT TO AUTOMATICALLY BAN ON THE HONEYPOT
- HONEYPOT_BAN="OFF"
- #
- # WHITELIST IP ADDRESSES, SPECIFY BY COMMAS ON WHAT IP ADDRESSES YOU WANT TO WHITELIST
- WHITELIST_IP="127.0.0.1,localhost"
- #
- # PORTS TO SPAWN HONEYPOT FOR
- PORTS="22,1433,8080,21,5900,25,53,110,1723,1337,10000,5800,44443,16993"
- #
- # SHOULD THE HONEYPOT AUTOMATICALLY ADD ACCEPT RULES TO THE ARTILLERY CHAIN FOR ANY PORTS ITS LISTENING ON
- HONEYPOT_AUTOACCEPT="ON"
- #
- # SHOULD EMAIL ALERTS BE SENT
- EMAIL_ALERTS="OFF"
- #
- # CURRENT SUPPORT IS FOR SMTP, ENTER YOUR USERNAME AND PASSWORD HERE. LEAVE BLANK FOR OPEN RELAY
- SMTP_USERNAME=""
- #
- # ENTER THE SMTP PASSWORD HERE. LEAVE BLANK FOR OPEN RELAY
- SMTP_PASSWORD=""
- #
- # THIS IS WHO TO SEND THE ALERTS TO - EMAILS WILL BE SENT FROM ARTILLERY TO THIS ADDRESS
- ALERT_USER_EMAIL="user@whatever.com"
- #
- # FOR SMTP ONLY HERE, THIS IS THE MAILTO
- SMTP_FROM="Artillery Incident"
- #
- # SMTP ADDRESS FOR SENDING EMAILS, DEFAULT IS GMAIL
- SMTP_ADDRESS="smtp.gmail.com"
- #
- # SMTP PORT FOR SENDING EMAILS DEFAULT IS GMAIL WITH TTLS
- SMTP_PORT="587"
- #
- # THIS WILL SEND EMAILS OUT DURING A CERTAIN FREQUENCY. IF THIS IS SET TO OFF, ALERTS
- # WILL BE SENT AUTOMATICALLY AS THEY HAPPEN (CAN LEAD TO A LOT OF SPAM)
- EMAIL_TIMER="ON"
- #
- # HOW OFTEN DO YOU WANT TO SEND EMAIL ALERTS (DEFAULT 10 MINUTES)
- EMAIL_FREQUENCY="600"
- #
- # DO YOU WANT TO MONITOR SSH BRUTE FORCE ATTEMPTS
- SSH_BRUTE_MONITOR="ON"
- #
- # HOW MANY ATTEMPTS BEFORE YOU BAN
- SSH_BRUTE_ATTEMPTS="4"
- #
- # DO YOU WANT TO MONITOR FTP BRUTE FORCE ATTEMPTS
- FTP_BRUTE_MONITOR="OFF"
- #
- # HOW MANY ATTEMPTS BEFORE YOU BAN
- FTP_BRUTE_ATTEMPTS="4"
- #
- # DO YOU WANT TO DO AUTOMATIC UPDATES. TYPE ON OR OFF
- AUTO_UPDATE="OFF"
- #
- # ANTI DOS WILL CONFIGURE MACHINE TO THROTTLE CONNECTIONS, TURN THIS OFF IF YOU DO NOT WANT TO USE
- ANTI_DOS="OFF"
- #
- # THESE ARE THE PORTS THAT WILL PROVIDE ANTI-DOS PROTECTION
- ANTI_DOS_PORTS="80,443"
- #
- # THIS WILL THROTTLE HOW MANY CONNECTIONS PER MINUTE ARE ALLOWED HOWEVER THE BURST WILL ENFORCE THIS
- ANTI_DOS_THROTTLE_CONNECTIONS="50"
- #
- # THIS WILL ONLY ALLOW A CERTAIN BURST PER MINUTE THEN WILL ENFORCE AND NOT ALLOW ANYMORE TO CONNECT
- ANTI_DOS_LIMIT_BURST="200"
- #
- # THIS IS THE PATH FOR THE APACHE LOG FILES INCLUDING ERROR AND ACCESS
- ACCESS_LOG="/var/log/apache2/access.log"
- ERROR_LOG="/var/log/apache2/error.log"
- #
- # THIS ALLOWS YOU TO SPECIFY AN IP ADDRESS. LEAVE THIS BLANK TO BIND TO ALL INTERFACES. EXAMPLE BIND_IP="192.168.1.154"
- BIND_INTERFACE=""
- #
- # THIS TURNS ON THE THREAT INTELLIGENCE FEED, THIS WILL CALL TO https://www.binarydefense.com/banlist.txt IN ORDER TO FIND
- # ALREADY KNOWN MALICIOUS WEBSITES. WILL PULL EVERY 24 HOURS
- THREAT_INTELLIGENCE_FEED="ON"
- #
- # CONFIGURE THIS TO BE WHATEVER THREAT FEED YOU WANT BY DEFAULT IT WILL USE BINARY DEFENSE
- # NOTE YOU CAN SPECIFY MULTIPLE THREAT FEEDS BY DOING #http://urlthreatfeed1,http://urlthreadfeed2
- THREAT_FEED="https://www.binarydefense.com/banlist.txt"
- #
- # A THREAT SERVER IS A SERVER THAT WILL COPY THE BANLIST.TXT TO A PUBLIC HTTP LOCATION TO BE PULLED BY
- # OTHER ARTILLERY SERVER. THIS IS USED IF YOU DO NOT WANT TO USE THE STANDARD BINARY DEFENSE ONE.
- #
- # THIS WILL DETECT IF A THREAT SERVER IS NEEDED, AS IN IT WILL COPY TO /var/www/ FOR YOU AUTOMATICALLY
- THREAT_SERVER="OFF"
- #
- # PUBLIC LOCATION TO PULL VIA HTTP ON THE THREAT SERVER. NOTE THAT THREAT SERVER MUST BE SET TO ON
- THREAT_LOCATION="/var/www/"
- #
- # THIS CHECKS TO SEE WHAT PERMISSIONS ARE RUNNING AS ROOT IN A WEB SERVER DIRECTORY
- ROOT_CHECK="ON"
- #
- # Specify SYSLOG TYPE to be local, file or remote. LOCAL will pipe to syslog, REMOTE will pipe to remote SYSLOG, and file will send to alerts.log in local artillery directory
- SYSLOG_TYPE="LOCAL"
- #
- # IF YOU SPECIFY SYSLOG TYPE TO REMOTE, SPECIFY A REMOTE SYSLOG SERVER TO SEND ALERTS TO
- SYSLOG_REMOTE_HOST="192.168.0.1"
- #
- # IF YOU SPECIFY SYSLOG TYPE OF REMOTE, SEPCIFY A REMOTE SYSLOG PORT TO SEND ALERTS TO
- SYSLOG_REMOTE_PORT="514"
- #
- # TURN ON CONSOLE LOGGING
- CONSOLE_LOGGING="ON"
- #
- # RECYCLE LOGS AFTER A CERTAIN AMOUNT OF TIME - THIS WILL WIPE ALL IP ADDRESSES AND START FROM SCRATCH AFTER A CERTAIN INTERVAL
- RECYCLE_IPS="OFF"
- #
- # RECYCLE INTERVAL AFTER A CERTAIN AMOUNT OF MINUTES IT WILL OVERWRITE THE LOG WITH A BLANK ONE AND ELIMINATE THE IPS - DEFAULT IS 7 DAYS
- ARTILLERY_REFRESH="604800"
- #
- # PULL ADDITIONAL SOURCE FEEDS FOR BANNED IP LISTS FROM MULTIPLE OTHER SOURCES OTHER THAN ARTILLERY
- SOURCE_FEEDS="ON"
- **************************************** remove_ban.py
- #!/usr/bin/python
- #
- # simple remove banned ip
- #
- #
- import sys
- from src.core import *
- try:
- ipaddress = sys.argv[1]
- if is_valid_ipv4(ipaddress):
- path = check_banlist_path()
- fileopen = file(path, "r")
- data = fileopen.read()
- data = data.replace(ipaddress + "\n", "")
- filewrite = file(path, "w")
- filewrite.write(data)
- filewrite.close()
- print("Listing all iptables looking for a match... if there is a massive amount of blocked IP's this could take a few minutes..")
- proc = subprocess.Popen("iptables -L ARTILLERY -n -v --line-numbers | grep %s" % (
- ipaddress), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
- for line in proc.stdout.readlines():
- line = str(line)
- match = re.search(ipaddress, line)
- if match:
- # this is the rule number
- line = line.split(" ")
- line = line[0]
- print(line)
- # delete it
- subprocess.Popen("iptables -D ARTILLERY %s" % (line),
- stderr=subprocess.PIPE, stdout=subprocess.PIPE, shell=True)
- # if not valid then flag
- else:
- print("[!] Not a valid IP Address. Exiting.")
- sys.exit()
- except IndexError:
- print("Description: Simple removal of IP address from banned sites.")
- print("[!] Usage: remove_ban.py <ip_address_to_ban>")
- **************************************************** restart_server.py
- #!/usr/bin/python
- #
- # restart artillery
- #
- #
- import subprocess
- import os
- import signal
- from src.core import *
- proc = subprocess.Popen(
- "ps -A x | grep artiller[y].py", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
- # kill running instance of artillery
- kill_artillery()
- print("[*] %s: Restarting Artillery Server..." % (grab_time()))
- if os.path.isfile("/var/artillery/artillery.py"):
- write_log("[*] %s: Restarting the Artillery Server process..." %
- (grab_time()))
- subprocess.Popen("python /var/artillery/artillery.py &",
- stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
- ***************************************************** setup.py
- #!/usr/bin/python
- #
- # quick script for installing artillery
- #
- import time
- import subprocess
- import re
- import os
- import shutil
- from src.core import *
- import sys
- import errno
- from src.pyuac import * # UAC Check Script found it here.https://gist.github.com/Preston-Landers/267391562bc96959eb41 all credit goes to him.
- try: input = raw_input
- except NameError: pass
- # Check to see if we are admin
- if is_windows():
- if not isUserAdmin():
- runAsAdmin()# will try to relaunch script as admin will prompt for user\pass and open in seperate window
- sys.exit(1)
- if isUserAdmin():
- print('''
- Welcome to the Artillery installer. Artillery is a honeypot, file monitoring, and overall security tool used to protect your nix systems.
- Written by: Dave Kennedy (ReL1K)
- ''')
- #create loop for install/uninstall not perfect but works saves answer for next step
- if not os.path.isfile("C:\\Program Files (x86)\\Artillery\\artillery.py"):
- answer = input("[*] Do you want to install Artillery [y/n]: ")
- #if above is false it must be installed so ask to uninstall
- else:
- if os.path.isfile("C:\\Program Files (x86)\\Artillery\\artillery.py"):
- #print("[*] [*] If you would like to uninstall hit y then enter")
- answer = input("[*] Artillery detected. Do you want to uninstall [y/n:] ")
- #put this here to create loop
- if answer.lower() in ["yes", "y"]:
- answer = "uninstall"
- # Check to see if we are root
- if is_posix():
- try: # and delete folder
- if os.path.isdir("/var/artillery_check_root"):
- os.rmdir('/var/artillery_check_root')
- #if not thow error and quit
- except OSError as e:
- if (e.errno == errno.EACCES or e.errno == errno.EPERM):
- print ("You must be root to run this script!\r\n")
- sys.exit(1)
- print('''
- Welcome to the Artillery installer. Artillery is a honeypot, file monitoring, and overall security tool used to protect your nix systems.
- Written by: Dave Kennedy (ReL1K)
- ''')
- #if we are root create loop for install/uninstall not perfect but works saves answer for next step
- if not os.path.isfile("/etc/init.d/artillery"):
- answer = input("Do you want to install Artillery and have it automatically run when you restart [y/n]: ")
- #if above is true it must be installed so ask to uninstall
- else:
- if os.path.isfile("/etc/init.d/artillery"):
- answer = input("[*] Artillery detected. Do you want to uninstall [y/n:] ")
- #put this here to create loop
- if answer.lower() in ["yes", "y"]:
- answer = "uninstall"
- if answer.lower() in ["yes", "y"]:
- if is_posix():
- #kill_artillery()
- print("[*] Beginning installation. This should only take a moment.")
- # if directories aren't there then create them
- #make root check folder here. Only root should
- #be able to create or delete this folder right?
- # leave folder for future installs/uninstall?
- if not os.path.isdir("/var/artillery_check_root"):
- os.makedirs("/var/artillery_check_root")
- if not os.path.isdir("/var/artillery/database"):
- os.makedirs("/var/artillery/database")
- if not os.path.isdir("/var/artillery/src/program_junk/"):
- os.makedirs("/var/artillery/src/program_junk/")
- # install to rc.local
- print("[*] Adding artillery into startup through init scripts..")
- if os.path.isdir("/etc/init.d"):
- if not os.path.isfile("/etc/init.d/artillery"):
- fileopen = open("src/startup_artillery", "r")
- config = fileopen.read()
- filewrite = open("/etc/init.d/artillery", "w")
- filewrite.write(config)
- filewrite.close()
- print("[*] Triggering update-rc.d on artillery to automatic start...")
- subprocess.Popen(
- "chmod +x /etc/init.d/artillery", shell=True).wait()
- subprocess.Popen(
- "update-rc.d artillery defaults", shell=True).wait()
- # remove old method if installed previously
- if os.path.isfile("/etc/init.d/rc.local"):
- fileopen = open("/etc/init.d/rc.local", "r")
- data = fileopen.read()
- data = data.replace(
- "sudo python /var/artillery/artillery.py &", "")
- filewrite = open("/etc/init.d/rc.local", "w")
- filewrite.write(data)
- filewrite.close()
- #Changed order of cmds. was giving error about file already exists.
- #also updated location to be the same accross all versions of Windows
- if is_windows():
- program_files = os.environ["PROGRAMFILES(X86)"]
- install_path = os.getcwd()
- shutil.copytree(install_path, program_files + "\\Artillery\\")
- os.makedirs(program_files + "\\Artillery\\logs")
- os.makedirs(program_files + "\\Artillery\\database")
- os.makedirs(program_files + "\\Artillery\\src\\program_junk")
- if is_posix():
- choice = input("[*] Do you want to keep Artillery updated? (requires internet) [y/n]: ")
- if choice in ["y", "yes"]:
- print("[*] Checking out Artillery through github to /var/artillery")
- # if old files are there
- if os.path.isdir("/var/artillery/"):
- shutil.rmtree('/var/artillery')
- subprocess.Popen(
- "git clone https://github.com/binarydefense/artillery /var/artillery/", shell=True).wait()
- print("[*] Finished. If you want to update Artillery go to /var/artillery and type 'git pull'")
- else:
- print("[*] Copying setup files over...")
- subprocess.Popen("cp -rf * /var/artillery/", shell=True).wait()
- # if os is Mac Os X than create a .plist daemon - changes added by
- # contributor - Giulio Bortot
- if os.path.isdir("/Library/LaunchDaemons"):
- # check if file is already in place
- if not os.path.isfile("/Library/LaunchDaemons/com.artillery.plist"):
- print("[*] Creating com.artillery.plist in your Daemons directory")
- filewrite = open(
- "/Library/LaunchDaemons/com.artillery.plist", "w")
- filewrite.write('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n<plist version="1.0">\n<dict>\n<key>Disabled</key>\n<false/>\n<key>ProgramArguments</key>\n<array>\n<string>/usr/bin/python</string>\n<string>/var/artillery/artillery.py</string>\n</array>\n<key>KeepAlive</key>\n<true/>\n<key>RunAtLoad</key>\n<true/>\n<key>Label</key>\n<string>com.artillery</string>\n<key>Debug</key>\n<true/>\n</dict>\n</plist>')
- print("[*] Adding right permissions")
- subprocess.Popen(
- "chown root:wheel /Library/LaunchDaemons/com.artillery.plist", shell=True).wait()
- choice = input("[*] Would you like to start Artillery now? [y/n]: ")
- if choice in ["yes", "y"]:
- if is_posix():
- # this cmd is what they were refering to as "no longer supported"? from update-rc.d on install.
- # It looks like service starts but you have to manually launch artillery
- subprocess.Popen("/etc/init.d/artillery start", shell=True).wait()
- print("[*] Installation complete. Edit /var/artillery/config in order to config artillery to your liking")
- #added to start after install.launches in seperate window
- if is_windows():
- os.chdir("src\windows")
- #copy over banlist
- os.system("start cmd /K banlist.bat")
- #Wait to make sure banlist is copied over
- time.sleep(2)
- #launch from install dir
- os.system("start cmd /K launch.bat")
- #cleanup cache folder
- time.sleep(2)
- os.system("start cmd /K del_cache.bat")
- #added root check to uninstall for linux
- if answer == "uninstall":
- if is_posix():
- try: #check if the user is root
- if os.path.isdir("/var/artillery_check_root"):
- os.rmdir('/var/artillery_check_root')
- #if not throw an error and quit
- except OSError as e:
- if (e.errno == errno.EACCES or e.errno == errno.EPERM):
- print ("[*] You must be root to run this script!\r\n")
- sys.exit(1)
- else:# remove all of artillery
- os.remove("/etc/init.d/artillery")
- subprocess.Popen("rm -rf /var/artillery", shell=True)
- subprocess.Popen("rm -rf /etc/init.d/artillery", shell=True)
- #added to remove service files on kali2
- #subprocess.Popen("rm /lib/systemd/system/artillery.service", shell=True)
- #kill_artillery()
- print("[*] Artillery has been uninstalled. Manually kill the process if it is still running.")
- #Delete routine to remove artillery on windows.added uac check
- if is_windows():
- if not isUserAdmin():
- runAsAdmin()
- if isUserAdmin():
- #remove program files
- subprocess.call(['cmd', '/C', 'rmdir', '/S', '/Q', 'C:\\Program Files (x86)\\Artillery'])
- #del uninstall cache
- os.chdir("src\windows")
- os.system("start cmd /K del_cache.bat")
- #just so they can see this message slleep a sec
- print("[*] Artillery has been uninstalled.\n[*] Manually kill the process if it is still running.")
- time.sleep(3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement