This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
(K, N) = map(int, raw_input().split()) | |
L = list() | |
for i in range(K): | |
l = map(int, raw_input().split()) | |
n = l[0] | |
L.append(l[1:]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
1. How to find the A record of а domain. | |
Command line: | |
$ nslookup example.com | |
2. How to check the NS records of a domain. | |
Command line: | |
$nslookup -type=ns example.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# SECTION 1 | Set Host IPv4 | |
# localhost: '127.0.0.1' # ADD USER TO LOCAL HOST | |
# remotehost <reopteIPv4> # ADD USER TO REMOTE HOST | |
# SECTION 2 | Generate Login Details | |
set -e # STOP IF ANY ERROR | |
if [ $(id -u) -eq 0 ]; then # VERIFY ROOT THEN IF ROOT | |
read -p "Enter username : " username # ENTER USER NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Program: Execute Ping Seep (ICMP Requests) and output results to a text file. | |
Interpreter Python 2.7 | Linux | |
""" | |
import os | |
import platform | |
from datetime import datetime | |
net = raw_input("Enter the IP address") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import subprocess | |
import sys | |
from datetime import datetime | |
subprocess.call("", shell=True) | |
rmip = input("ENTER REMOTE HOST IP: ") | |
ps1 = int(input("ENTER START PORT NUMBER TO SCAN: ")) | |
ps2 = int(input("ENTER LAST PORT NUMBER TO SCAN: ")) | |
print("*"*40) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from bs4 import BeautifulSoup | |
import csv | |
import pandas as pd | |
mostActiveStocksUrl = "https://www.nasdaq.com/markets/most-active.aspx" | |
r = requests.get(mostActiveStocksUrl) | |
data = r.text | |
soup = BeautifulSoup(data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Author: Guy D. | |
Last Modified: 31 JUL 19 | |
Program: Scan an entire subnet with Python using ICMP ECHO request to view live hosts. | |
This sample code is provided for the purpose of illustration "AS IS" WITHOUT WARRANTY OF ANY KIND. | |
""" | |
import os | |
import platform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Define a function decimalToRep that returns the representation of an integer in a | |
given base. The two arguments should be the integer and the base. The function | |
should return a string. It should use a lookup table that associates integers with | |
digits. Include a main function that tests the conversion function with numbers | |
in several bases. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################## | |
# Author: Guy D. # | |
# Last Day Modified: 6/23/19 # | |
############################## | |
""" Write a program that allows the user to navigate the lines of text in a file. The | |
program should prompt the user for a filename and input the lines of text into a | |
list. The program then enters a loop in which it prints the number of lines in the | |
file and prompts the user for a line number. Actual line numbers range from 1 to | |
the number of lines in the file. If the input is 0, the program quits. Otherwise, the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
decimal = int(input("ENTER A DECIMAL INT: ")) | |
if decimal == 0: | |
print(0) | |
else: | |
print("QUOTIENT REMAINDER BINARY") | |
bitString = "" | |
while decimal > 0: | |
remainder = decimal % 2 | |
decimal = decimal // 2 | |
bitString = str(remainder) + bitString |
NewerOlder