Skip to main content

Posts

Showing posts with the label Python

ᴄᴏᴅɪɴɢ | ʜᴏᴡ ᴛᴏ ᴍᴀᴋᴇ ᴀ ᴘʏᴛʜᴏɴ ʜᴏsᴛ ᴄʜᴇᴄᴋᴇʀ ғᴏʀ ʟɪɴᴜx

 📕 ᴄᴏᴅɪɴɢ ɪs ᴛʜᴇ ᴇᴀsʏ ᴘᴀʀᴛ. ʙᴇɢɪɴ ғʀᴏᴍ ɪᴍᴘᴏʀᴛɪɴɢ sʏs ᴀɴᴅ sᴏᴄᴋᴇᴛ, ᴛʜᴇɴ, ᴡʀɪᴛᴇ ᴛʜᴇ ғᴏʟʟᴏᴡɪɴɢ ᴄᴏᴅᴇ: import os # Importing main libs import sys start = "" # Setting up variables range1 = 0 range2 = 0   for carg in sys.argv: # Checking for arguments     if carg == "-s":         argnum = sys.argv.index(carg)         argnum += 1 start = sys.argv[argnum]     elif carg == "-r1":         argnum = sys.argv.index(carg)         argnum += 1         range1r = sys.argv[argnum]         range1 = int(range1r)     elif carg == "-r2":         argnum = sys.argv.index(carg)         argnum += 1         range2r = sys.argv[argnum]         range2 = int(range2r)   print ("[*] Host Scanner launched!") # Informs user about initialize   if start == "": # Checks if all th...