![]() |
|
Suggest Me Some Ideas For A Python Program - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: Python (https://sinister.ly/Forum-Python) +--- Thread: Suggest Me Some Ideas For A Python Program (/Thread-Suggest-Me-Some-Ideas-For-A-Python-Program) |
Suggest Me Some Ideas For A Python Program - Eclipse - 05-27-2014 Hey guys, The title is self explanatory, but for those of you that are slightly retarded: Suggest me some ideas for a python program. It can be basic or more advanced. I want something that will challenge me and actually make me have to learn something new in order to do it instead of reusing skills I already have. The one condition, is that it has to be solely in the standard PY toolkit. (Ver. 3) Aurora RE: Suggest Me Some Ideas For A Python Program - 3SidedSquare - 05-27-2014 Create a framework for making nice ASCII GUI's in a XTerm compatible terminal (please?) I would actually use this... RE: Suggest Me Some Ideas For A Python Program - Eclipse - 05-27-2014 (05-27-2014, 09:46 PM)3SidedSquare Wrote: Create a framework for making nice ASCII GUI's in a XTerm compatible terminal (please?) Holy shit. You made it as complex as you could didn't you? I'd be happy to do this, provided that you explain what you mean. Could you elaborate? RE: Suggest Me Some Ideas For A Python Program - 3SidedSquare - 05-27-2014 Sure, usually in gui's you have "widgets" placed on the screen at co-ord's (from top left). Widgets are anything, text, text boxes, buttons, check-boxes ect. XTerm is kinda a wibbly-wobbly set of standards for command lines. Some things you can count on are UTF-8 character set, being told how large the screen is, (in characters), and mouse clicks. I want a bunch of classes that allow me to make widgets that display stuff. Full with colors (foreground and background), frames, ect. I did a little bit with this stuff once for my SkyNet server, although I didn't use widgets or anything, just kidnda hacked it together. This was was made to be compatible with VT100, which didn't give info like mouse clicks. Never released it either, but here it is: Code: import sys
import os
import time
from threading import Thread, Timer
import socket
TOKENS_PATH = "./tokens"
HACKLOG_PATH = "./hacker_logs"
BORDERCOLOR = '\033[32m'
INVISIBLECOLOR = '\033[31m'
CREDITCOLOR = '\033[36m'
TITLESCOLOR = '\033[94m'
RESETCOLOR = '\033[0m'
TEXTCOLOR = '\033[34m'
SCREEN_WIDTH = 50
SCREEN_HIGHT = 50
class Monitor():
users = {}
logedIn = {}
messageLog = ""
settings = {}
s = socket.socket()
def __init__(self):
self.parseConfig()
self.s.bind(('',int(self.settings["INNER_PORT"])))
def parseConfig(self):
f = open('./settings.ini','r')
for line in f:
setting, value = line.split(" ")
self.settings[setting] = value
def userConnect(self, addr="FAILED"):
self.users[addr] = time.gmtime()
def loginAttempt(self, ip="FAILED", username="FAILED"):
self.logedIn[ip] = 120
def message(self, mess):
self.messageLog += mess
def messageLine(self):
self.messageLog += ",[]"
def tick(self):
for log in self.logedIn:
if(self.logedIn[log] == 0):
self.logedIn[log] = 1
self.logedIn[log] -= 1
self.display()
def clearScreen(self):
print('\033c')
def spacePad(self, string, pad, align='Left'):
string = str(string)
if(len(string) >= pad):
return string[0:pad]
if(align == 'Left'):
spaces = pad - len(string)
output = string
y = 0
while(y < spaces):
output += "#"
y += 1
return output + "#"
if(align == 'Right'):
spaces = pad - len(string)
output = ""
y = 0
while(y < spaces):
output += "#"
y += 1
return output +"#"+ string
if(align == 'Center'):
spaces = pad - len(string)
right = spaces/2
left = spaces/2
y = 0
output = ""
while(y < left):
output += "#"
y += 1
output += string
y = 0
while(y < right):
output += "#"
y += 1
return output
return ""
def display(self):
self.clearScreen()
print(BORDERCOLOR)
topBoarder = '##'
for x in range(0,SCREEN_WIDTH):
topBoarder += "#"
print(topBoarder)
credits = "SkyNet Python Web Server By: 3SidedSquare "
creditline = "#" + INVISIBLECOLOR + "#" + CREDITCOLOR + credits + INVISIBLECOLOR + "#" + BORDERCOLOR + "#"
print(creditline)
print(topBoarder)
x = 0
easyNum = {}
for log in self.logedIn:
easyNum[x] = log
x = x + 1
print(x)
z = 0
ueasyNum = {}
for u in self.users:
ueasyNum[z] = u
z += 1
##ok, so x will hold how many users I have loged in...
titleline = "#" + TITLESCOLOR + self.spacePad("Logged in users", 30, 'Center') + BORDERCOLOR + "#" + TITLESCOLOR + self.spacePad("Frequently hit",21,'Center') + BORDERCOLOR + "#"
print(titleline)
xc = 10
line = ""
while(xc>0):
if(easyNum.get(x,None) != None):
line += BORDERCOLOR + "#" + TEXTCOLOR + self.spacePad(easyNum[x],20,'Left')
line += self.spacePad(logedIn[easyNum[x]],8,'Right')
line += BORDERCOLOR + "#" + TEXTCOLOR
else:
line += BORDERCOLOR + "#" + TEXTCOLOR + self.spacePad("",20,'Left')
line += self.spacePad("",8,'Right')
line += BORDERCOLOR + "#" + TEXTCOLOR
if(ueasyNum.get(x,None) != None):
line += self.spacePad(str(ueasyNum[x])[2:min(17,len(ueasyNum[x]))],15,'Left')
line += self.spacePad(self.users[ueasyNum[x]][5:],4,'Right')
line += BORDERCOLOR + "#"
else:
line += self.spacePad("",15,'Left')
line += self.spacePad("",2,'Left') + BORDERCOLOR + "#"
print(line)
line = ""
xc -= 1
x += 1
print(topBoarder)
ray = self.messageLog.split(",[]")
c = len(ray)
cl = c - 4
while(cl < c):
line = (BORDERCOLOR + "#" + TEXTCOLOR + self.spacePad(ray[cl],49,'Left') + BORDERCOLOR + "#")
print(line)
cl+=1
print(topBoarder)If you've ever messed with the BIOS options, that is all just characters with background and foreground colors, and some symbols Spoiler:![]() RE: Suggest Me Some Ideas For A Python Program - Crypt - 05-27-2014 A program that detects vulnerabilities in websites so you don't have to constantly look for them on your own. RE: Suggest Me Some Ideas For A Python Program - liquid - 05-28-2014 Possibly the same sort of idea as Crypt... A reconnaissance script : host/dig info, scan ports, list versions, web directory structures (and include any sub domains linked to that site) print all that information out in a nice readable format and I would use it. RE: Suggest Me Some Ideas For A Python Program - Eclipse - 05-28-2014 (05-27-2014, 10:35 PM)Crypt Wrote: A program that detects vulnerabilities in websites so you don't have to constantly look for them on your own.I don't know many vunerabilities, but I could do something similar to what liquid said. (05-28-2014, 02:03 AM)liquid Wrote: Possibly the same sort of idea as Crypt... RE: Suggest Me Some Ideas For A Python Program - Equinox - 05-31-2014 (05-28-2014, 02:35 PM)Aurora Wrote: I don't know many vunerabilities, but I could do something similar to what liquid said. I'd suggest something basic. Go for SQLi. I'll even help you if you need. Here's the first step (of both the program and SQLi): See if the target is vulnerable. Code: import sys
class urllib:
if sys.version_info[0]>=3:
import urllib.request
raw_input = input
else: __import__("urllib2")
def tr(w):
if 'You have an error in your SQL syntax;' in str(urllib.request.urlopen(str(w)).read().decode()): return (w+' is probably vulnerable to SQLi.')
else: return (w+' might not be vulnerable to SQLi.')
if __name__=='__main__':
try: w = str(sys.argv[1])+"'"
except: w = str(raw_input('> '))+"'"
print(tr(w))Also, if you're looking into 3SS's project, here's a module I made for Linux colours in terminal that might help you: https://github.com/Duubz/ColMod/blob/master/colours.py RE: Suggest Me Some Ideas For A Python Program - A5^ - 07-25-2014 return a fun and practical method for suicide from the practical guide to suicide |