ich sitz nun schon mehrere Tage vor Python und bin recht zufrieden mit der Sprache. Aber ich komm nicht so recht weiter...
was könnt ich daraus noch machen?
Code: Alles auswählen
import sys, socket
from time import *
print ctime()
#import urllib2
#for line in urllib2.urlopen('http://tycho.usno.navy.mil/cgi-bin/timer.pl'):
# if 'EST' in line:
# print line
badloop = 0
while badloop < 10000:
c = raw_input('Victim$:') #kleine console quasi wenn man Threads noch nutzt
if c == "exit":
break
else:
result = socket.getaddrinfo(a , None, 0, socket.SOCK_STREAM)
counter = 0
for item in result:
#print "%-2d: %s" % (counter, item[4])
b = max(item[4]) #geil, die bloße IP adresse ;)
print b + "\n"
print "Creating socket...",
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print "done.\n"
print "Connecting to...",b,"."
s.connect((b, 80))
print "Done.\n"
# Set the socket parameters
#host = b
#port = 21
#buf = 1024
#addr = (host,port)
# Create socket
#UDPSock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
#def_msg = "===Enter message to send to server===";
#print "\n",def_msg
# Send messages
#while (1):
#data = raw_input('>> ')
#if not data:
#break
#else:
#if(UDPSock.sendto(data,addr)):
#print "Sending message '",data,"'.....<done>"
# Close socket
counter += 1
try:
result = socket.gethostbyaddr(b)
print "hostname$:"
print " " + result[0]
# Display the list of available addresses that is also returned
#print "\nAddresses:"
#for item in result[2]:
# print " " + item
except socket.herror, e:
print "Couldn't look up name:", e
badloop += 1
Ich möchte eine Homepage erstellen die ähnlich ausschaut wie diese:
http://www.disenchant.ch/blog/
nur wie mach ich das?
help!
MfG
und frohes Neues!
