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 sys | |
a=list('abcdefghijklmnopqrstuvwxyz') | |
A=list('ABCDEFGHIJKLMNOPQRSTUVWXYZ') | |
s=raw_input('texto: ') | |
def rot(k): | |
for j in s: | |
if j==' ': | |
sys.stdout.write(' ') | |
if j.isupper(): |
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, sys, thread, re | |
import httplib, urllib2 | |
global ip_client | |
ip_client=urllib2.urlopen('https://enabledns.com/ip') | |
ip_client=ip_client.read() | |
def start(): | |
try: | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
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 sys | |
from thread import * | |
import sqlite3 | |
from Crypto.Cipher import DES | |
from Crypto import Random | |
HOST = '' | |
PORT = 8888 | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
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
#include <stdio.h> | |
int main(){ | |
int M,m; | |
int ch,k,r; | |
ch=getchar(); | |
//ascii >> A=65,a=97 e Z=90,z=122 | |
for (M=65, m=97;(M<=90) && (m<=122);M++, m++){ | |
while ((ch=getchar()) != EOF){ | |
r=rand()%26; |
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
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
int | |
main(int argc, char **argv) | |
{ | |
char password[] = "zeldani"; | |
if(argc < 2) |
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 numpy as np | |
x=np.array([1,5,2]) | |
y=np.array([7,4,1]) | |
z=np.array([[1,2,3], | |
[4,5,6], | |
[7,8,9]]) | |
a=x+y | |
m=x*y | |
t=z.transpose() | |
print a,m,'\n',t |
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 string | |
import numpy as np | |
from numpy.linalg import inv | |
M = [[7,18,5], | |
[1,20,23], | |
[15,18,11]] | |
C = np.array([[1,1,2], | |
[1,2,2], | |
[1,4,3]]) |
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 numpy as np | |
import pylab as pl | |
dados = np.random.normal(5.0, 3.0, 1000) | |
pl.hist(dados) | |
pl.xlabel('dados') | |
pl.title('Meu Histograma') | |
pl.show() |
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 numpy as np | |
import pylab as pl | |
x1 = np.arange(15) | |
y1 = 0.5*x1 + 0.6 | |
x2=[0,2,4,6,8,10,12,14] | |
y2=[0,2,4,4,5,5,7,8] | |
plot1=pl.plot(x1,y1,'r') | |
plot2=pl.plot(x2,y2,'go') |
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 nmap | |
import optparse | |
def nmapScan(tgtHost, tgtPort): | |
nmScan = nmap.PortScanner() | |
nmScan.scan(tgtHost, tgtPort) | |
state=nmScan[tgtHost]['tcp'][int(tgtPort)]['state'] | |
print " [*] " + tgtHost + " tcp/"+tgtPort+" "+state | |
def main(): | |
parser = optparse.OptionParser('usage%prog' + |
NewerOlder