import socket 
import requests
import base64
    

def main():
   
    hostname = socket.gethostname() #Mencari hostname
    
    host64 = hostname.encode('utf-8') #Di encode ke base64
    encode64 = base64.b64encode(host64)
    
    url = "http://pastebin.com/api/api_post.php" #Upload ke Pastebin
    upload = requests.post(url, encode64)
    
    print(f"Host name is : {hostname}") #Print hostname


if __name__ == "__main__":
    main()
