This forum is in archive mode. You will not be able to post new content.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - cat_vs_mouse

Pages: [1]
1
General discussion / Re: Which OS?
« on: April 17, 2012, 07:52:42 AM »
Thanks, Ubuntu it is!  :D

2
General discussion / Which OS?
« on: April 16, 2012, 09:30:32 PM »
Hi. Today I decided to get an old computer which I had lying around, not doing much running again for my half-sister - she's 8. It's running Windows Millennium Edition and so I want to change the Operating System.


Now, here's the question:
She only has experience with Win XP and 7  :'( . I've got a copy of the Windows 8 ISO on my own computer so, should I change the OS to Ubuntu Linux or keep with the same sort of GUI and install Windows 8? Bear in mind, she won't be doing any hacking...

3
Hacking and Security / Re: Need Help. CVE-2011-1999
« on: April 16, 2012, 06:58:17 PM »
Then you're gonna have to spend some time debugging the code  :P . Gd luck.

4
Hacking and Security / Re: Need Help. CVE-2011-1999
« on: April 16, 2012, 08:57:03 AM »
Code: [Select]
http://seclists.org/bugtraq/2012/Feb/178

Hope this helps...

5
Scripting Languages / Re: Can anyone help me with this code?
« on: April 06, 2012, 10:46:16 PM »
You should learn about classes and methods.


The problem you where having is, you kept referencing the Label class to keep track of all images.


Each image should be kept with it's respected widget. The Label doesn't care about the buttons in the root frame, and can't have children inheritances.


In the working code below, really study how I have it set up. The code is a bit different, with proper variable names and structure. Remember to keep things together as much as you can, and load anything intensive at the beginning of the code, like images/video/large files/etc...


Code: [Select]

from Tkinter import *


class app:


    def __init__(self, master):
        #create the root window
        frame = Frame(master)
        frame.pack()


        #load images into memory
        logo = PhotoImage(file="logo.gif")
        quit = PhotoImage(file="quitbut.gif")
        hello = PhotoImage(file="hellobut.gif")


        #set up label
        logoLabel = Label(frame, image=logo)
        logoLabel.image = logo #****
        logoLabel.pack()


        #set up buttons
        exitButton = Button(frame, image=quit, fg="red", command=frame.quit)
        exitButton.image = quit #****
        exitButton.pack(side=LEFT)


        helloButton = Button(frame, image=hello, command=self.say_high)
        helloButton.image = hello #****
        helloButton.pack(side=LEFT)


    def say_high(self):
        print "Hello world!"


root = Tk()
myApp = app(root)
root.mainloop()


The commented lines with #****, in Tk you need a reference from the class that's using it, so it can store it in cache so the garbage collector doesn't erase what's in memory.


And this is only one way to skin the cat.


Thanks; it's working great now! (+1)

6
Scripting Languages / Re: Can anyone help me with this code?
« on: April 06, 2012, 06:57:33 PM »
I use Wxpython but I think...and Im probably wrong... but it looks as if w.pack just keeps on running, it seems as if your code doesnt get past w.pack().


Thanks. This doesn't seem to be the problem ( :( ) 'cause I removed the w.pack()s and it still is happening  :'( . +1 anyway; thanks for trying.

7
Scripting Languages / Can anyone help me with this code?
« on: April 06, 2012, 01:18:23 PM »
Hey. Can anyone help me with this Python code. I have created it as a sort of test using Python GUIs but I can't get all the images to display. When I run the script, only one of the images appears. If I get rid of that image then another one appears. There are three images that I want to display at the same time. How can I do this?


Code: [Select]
#!/usr/bin/python


from Tkinter import *


class App:


    def __init__(self, master):


        frame = Frame(master)
        frame.pack()


#You need to create logo.gif,
        photo = PhotoImage(file="logo.gif")
        w = Label(frame, image=photo)
        w.photo = photo
        w.pack()


#quitbut.gif and
        xphoto = PhotoImage(file="quitbut.gif")
        w.photo = xphoto
        w.pack()
       
        self.button = Button(frame, image=xphoto, text="QUIT", fg="red", command=frame.quit)
        self.button.pack(side=LEFT)




#hellobut.gif
        yphoto = PhotoImage(file="hellobut.gif")
        w.photo = yphoto
        w.pack()
       
        self.hi_there = Button(frame, image=yphoto, text="Hello", command=self.say_hi)
        self.hi_there.pack(side=LEFT)


    def say_hi(self):
        print "Hi there, everyone!"


root = Tk()


app = App(root)


root.mainloop()

9
Projects and Discussion / Re: Evilzone IRC client
« on: April 05, 2012, 11:04:43 PM »
I am assuming your using Tkinter. To get text from the Entry widget, use it's "get" method.


Code: [Select]


entry_widget = Entry(some_parent_frame)
entry_widget.pack(side=RIGHT)


....


my_text = entry_widget.get()


In a nutshell. You will need to know the parent frame, which could be root, or another widget. You might have some other formatting thrown in as well, but you should get the point.


Cheers; that helps a lot! (I am using Tkinter. I should've specified that  ::) )
;D

10
Projects and Discussion / Re: Evilzone IRC client
« on: April 05, 2012, 10:15:36 PM »
Wait what. You made all that and only NOW you will learn about variables? am I the only one that find it interesting?

Making an IRC client is a nice thing. While it may not be very useful it sure it lots of experience. I remember when I was doing HawtBawt (in delphi) which was an IRC bot. I didn't finish it but it works, somewhat. You can check my code for details if you want.


Thanks for your quick reply! I sort of forgot about variables because I was being stupid  ::) .  Do you have any idea how to write text from a text box to a variable in Python? Basically, I'm going to have that variable then sent to the channel (I don't mean that literally. I mean posting it to the channel). Does that sound like a good idea? My project is DEFINETLY not going to have as much functionality as yours but I hope it can at least connect to a server...


By the way:
I plan to let users switch channels with variables as well.

11
Projects and Discussion / Evilzone IRC client
« on: April 05, 2012, 09:25:36 PM »
I am trying to create a chat program in Python specifically for the evilzone IRC.  :D


So far; I've learnt how to create a GUI, how to contact an IRC's servers and post to them and how to receive messages posted. Next I'm going to learn about variables in Python...


This project probably sounds easy but I never actually learnt Python so this is all new to me. I sort of like the syntax so I might learn it once I've finished Ruby.


EDIT:


I've given up on this. If anyone wants the unfinished source they can have it...

12
Hacking and Security / Re: Logic bomb
« on: April 05, 2012, 04:17:42 PM »
I know it's near impossible to make a virus in python but here's a good link on how to make your code run at a certain time:
Code: [Select]
http://docs.python.org/library/sched.html
If you could integrate that module with running an external program. If you don't already know how then look here:
Code: [Select]
http://docs.python.org/library/os.html#os-process

You could make the sched module run a C++, C etc... program at a certain time.


The only problem is getting them to run the python file but you could make it install to the "startup" folder (on Windows) if you made a trojan.


Hope this helps!  :D

Pages: [1]


Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.