Last active
August 23, 2018 14:23
-
-
Save ketankr9/c198170725df4d2627a21ef7c900a3b9 to your computer and use it in GitHub Desktop.
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
* know your public ip: ~$ `curl ipecho.net/plain; echo` | |
~$ `curl icanhazip.com` | |
* get headers only | |
curl -sI http://167.99.226.14:8000/tshirt.jpg | |
* split files and download: `https://www.maketecheasier.com/split-download-large-file-curl/` | |
curl --range 0-100000 -o song.mp3.part1 http://url/song.mp3 | |
curl --range 100001- -o song.mp3.part2 http://url/song.mp3 #till end, remaining | |
#join file | |
cat song.mp3.part? > song.mp3 | |
#transfer files over ssh to amazon aws ec2 | |
scp -i /ketankr9privatekey.pem path_to_current.tar.gz [email protected]:~/file_dir | |
#scrap JavaScript driven dynamic webpage | |
>>> import dryscrape | |
>>> from bs4 import BeautifulSoup | |
>>> session = dryscrape.Session() | |
>>> session.visit(my_url) | |
>>> response = session.body() | |
>>> soup = BeautifulSoup(response) | |
>>> soup.find(id="intro-text") | |
<p id="intro-text">Yay! Supports javascript</p> | |
source="http://stackoverflow.com/questions/8049520/web-scraping-javascript-page-with-python" | |
#get netbios name | |
>>>nmap -sU -p 137,5353 --script nbstat,dns-service-discovery $targets | |
* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment