Added argv to python script
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
		@@ -5,7 +5,11 @@ from urllib.parse import parse_qs
 | 
				
			|||||||
import sys
 | 
					import sys
 | 
				
			||||||
import requests as r
 | 
					import requests as r
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if len(sys.argv) > 1 :
 | 
				
			||||||
 | 
					    API_ADDRESS = "http://" + sys.argv[1] + ":1285"
 | 
				
			||||||
 | 
					else:
 | 
				
			||||||
    API_ADDRESS = "http://localhost:1285"
 | 
					    API_ADDRESS = "http://localhost:1285"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PORT = 3000
 | 
					PORT = 3000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -24,7 +28,6 @@ class S(BaseHTTPRequestHandler):
 | 
				
			|||||||
        self.wfile.write("Your token: {}".format(
 | 
					        self.wfile.write("Your token: {}".format(
 | 
				
			||||||
            response.text).encode('utf-8'))
 | 
					            response.text).encode('utf-8'))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
def wait_for_request(server_class=HTTPServer,
 | 
					def wait_for_request(server_class=HTTPServer,
 | 
				
			||||||
                     handler_class=S):
 | 
					                     handler_class=S):
 | 
				
			||||||
    server_address = ('localhost', PORT)
 | 
					    server_address = ('localhost', PORT)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user