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/python3 | |
#Desarrolle un programa en Python3 utilizando Pygame y expresiones lambda | |
#que genere figuras de distintos colores según la posicion del puntero y el tiempo. | |
#Las figuras no deben exeder los 100 píxeles de diámetro. | |
#Debe dar la sesación que el cursor pinta en la pantalla. | |
import pygame | |
import datetime |
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
# -*- coding: utf-8 -*- | |
''' | |
En el ámbito de la programación, una función anónima (función literal, expresión lambda) | |
es una subrutina definida que no está enlazada a un identificador, no tiene nombre, | |
es una función anónima. | |
''' | |
# Las expresiones lambda pueden llevar o no parámetros. | |
# Las expresiones lambda pueden asignarse a variables para ser reutilizadas. |
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 zipfile | |
import optparse | |
from threading import Thread | |
def extractFile(zFile, password): | |
try: | |
zFile.extractall(pwd=password) | |
print '[+] Found password ' + password + '\n' | |
except: | |
pass |
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
# | |
# deb cdrom:[Debian GNU/Linux 2017.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170416-02:08]/ kali-rolling contrib main non-free | |
#deb cdrom:[Debian GNU/Linux 2017.1 _Kali-rolling_ - Official Snapshot amd64 LIVE/INSTALL Binary 20170416-02:08]/ kali-rolling contrib main non-free | |
deb http://http.kali.org/kali kali-rolling main non-free contrib | |
# deb-src http://http.kali.org/kali kali-rolling main non-free contrib | |
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
#!/bin/bash | |
read -p "[!] Enter Broker IP or URL (f.e. broker.hivemq.com): " broker | |
echo "[!] Testing broker $broker connection with ping . . . " | |
echo "[!] Please wait . . ." | |
brokeron=$(ping -c 4 $broker) | |
if [ $? -gt 0 ]; then |
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 argparse | |
import os ,sys | |
import logging | |
from crontab import CronTab | |
""" | |
Task Scheduler | |
========== | |
This module manages periodic tasks using cron. | |
""" | |
class CronManager: |
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 random | |
cant = random.randint(3,999) | |
ult = random.randint(2,999) | |
nums = [] | |
for i in range(0,cant): | |
num = random.randint(1,1000) | |
nums.append(num) | |
print "Generando numeros ... " + str(num) |
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
mfruba's solution worked for me and my TP-Link TL-WN722N v2 (Realtek) in Kali. Here's how I used it: | |
I've downloaded all the code in a zip file from mfruba's repository: https://github.com/mfruba/kernel/archive/master.zip | |
> unzip ~\master.zip | |
> cd ~/master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417 | |
> make |
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 datetime | |
import random | |
h = datetime.datetime.now() | |
#calculate datitmes in seconds | |
def calculate_times(**kwargs): | |
difference = kwargs["end_datetime"] - kwargs["start_datetime"] | |
seconds = int(difference.total_seconds()) | |
step = int(seconds / kwargs["limit"]) |
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
int pinSensor = A5; | |
int valorSensor = 0; | |
int valorLegible = -1; | |
int green = 2; | |
int blue = 3; | |
int red = 4; | |
int actuador = 5 ; | |
int infrared = 6; | |
int prox; |