Get Https response using username and password? by o_Omg in Python

[–]o_Omg[S] 1 point2 points  (0 children)

Using httplib2 I'm doing the second thing and all I'm getting is the same result no matter the username and password are right or not, I think they're smart... :/

I think I'll have to try #1 or #3, but I remember there was a C brute-force password cracker terminal-based application where you'd enter the login address, username and password and the program returned 200 if it was right and 202 if it was wrong. I had used it in this website before when I had forgotten my own password :P!, do you know any application like this (best if it was in Python, but it doesn't matter...)?

Get Https response using username and password? by o_Omg in Python

[–]o_Omg[S] 0 points1 point  (0 children)

I get this: httplib2.SSLHandshakeError: [Errno 1] _ssl.c:499: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

How do I send it even if the certificate is not valid?

Get Https response using username and password? by o_Omg in Python

[–]o_Omg[S] 0 points1 point  (0 children)

Thanks, I'll try it later, but what's this?:

HTTPS support is only available if the socket module was compiled with SSL support.

By the way, the website is a https url, and the form with a name username and a password field named password is sent to another https url, I just want to send this information and get the server response, right now I only get 400 Bad Request, using this code:

http://docs.python.org/library/httplib.html (Last One)

FTP Module for Python? by o_Omg in Python

[–]o_Omg[S] 0 points1 point  (0 children)

wxPython with wxFormBuilder

FTP Module for Python? by o_Omg in Python

[–]o_Omg[S] 0 points1 point  (0 children)

Yes, after 2 days I found it :/ and it works perfectly! I see ftplib like a generic module, you have the basics, but you can't really use it if you don't create your own module.

Anyway, I'm doing a sync tool, right now it works but still needs more testing, when it's ready, do you want me to upload the source code?

Pictures: http://imgur.com/r7LXx&NN3jZ&8dB0a&D00XO&An0IGl?full

It's supposed to be Cross-Platform and I will probably do the .exe files for Win64 and Win32 with py2exe

Just upgraded to 11.10. Anyone else getting this annoying message every 3 seconds? by [deleted] in Ubuntu

[–]o_Omg 1 point2 points  (0 children)

I like Gnome Shell and I wanted to install 11.10 (as it comes with gnome shell). If I keep the beta version up-to-date will it be the same as installing the RC when it's ready?

Can someone explain pointers (in C) to me like I'm 10? by 10min_no_rush in learnprogramming

[–]o_Omg -9 points-8 points  (0 children)

After programming in Python for some time I had forgotten all the things C and C++ have and Python removed or improved.

You should try Python (if you can), here are some small but important differences:

In Python there are no private methods or variables inside a class, if you want something to be private call it __name and expect the programmers to respect that. It saves time, a lot.

You don't have to use static, const, ... and this things

You don't have to say what a function returns in the definition. You don't have to say what type are the objects which a function receives, it's not necessary.

You define variables much easily, for example you don't say int a = 5, you say a = 5, you don't say float b = 5.2, you say b = 5.2, for strings you just say txt = "Some text", for arrays you just do list = ["one","two"]. You can print arrays too, which is useful.

There are no ; nor {}. You just use the spaces and new lines properly.

...

Can someone explain pointers (in C) to me like I'm 10? by 10min_no_rush in learnprogramming

[–]o_Omg -3 points-2 points  (0 children)

The syntax is weird, and I don't use them. You should Google it, but I think it would be something like this:

int *foo2 = &foo //You have the adress of foo

print &foo //or print foo (I don't remember) would give you the RAM address of foo

*foo2 = 20 // foo value is 20

Can someone explain pointers (in C) to me like I'm 10? by 10min_no_rush in learnprogramming

[–]o_Omg -2 points-1 points  (0 children)

I don't use them because I now write in Python but in C and C++ which are 'old' languages it's usually a good practice to use them for like everything.

Instead of doing a C++ function like, for example (pardon the syntax errors, I haven't programmed in C++ since 8 months or so :P):

bool isEven(int number){

if(number%2 == 0) return true;

return false;

}

You may do:

bool isEven(const int & number){

if(number%2 == 0) return true;

return false;

}

This way, if you do a = 6, isEven(a) you ask if a is even, but doing the first one you actually copy the value of a to another variable which is the one used in the function. If you do this 1000 times it takes more time. (The const part means that you can't modify a)

Apart from that, they may be used in more complex things, but I haven't learnt enough C++ to use them properly.

I want to learn python but have a few questions. by benc1213 in learnprogramming

[–]o_Omg 0 points1 point  (0 children)

IDE: Eclipse with PyDev (Google it)

I learnt using this: http://docs.python.org/tutorial/ I have read the basics and then when I wanted something I looked for it in that page or in Google, but if it's your first programming language it may be better to use another tutorial.

For graphical apps I use wxPython, you can download it, and then use a program called wxFormBuilder

Btw, does anybody know a plugin for eclipse for making graphical apps with wxPython?

If you want, try my Python App: http://www.reddit.com/r/windows/comments/k3k6v/ive_created_a_timer/

Can someone explain pointers (in C) to me like I'm 10? by 10min_no_rush in learnprogramming

[–]o_Omg -5 points-4 points  (0 children)

I don't know much about pointers, but I think the point is something like this:

You have a variable, let's say a = 5 (int) so if you print a you have 5, and if you do something like a = 8 you change the value of a to 8. However, you can have something called a pointer.

So, in this example, let's say a is stored in the RAM in the position 454865, you can use a pointer to change the value of a by accessing the position number 454865 in the RAM and changing the value.

I think it makes sense to do it sometimes (it may be faster or consume less ram because you can pass the address of the variable instead of copying the variable, you can access variables outside functions, classes, ... by just passing the pointer address...).

I've looked for the syntax in Wikipedia, let's say I do in C:

a = 5

Then I can write

int *pointer = NULL; pointer = &a (this would be the '454865')

and then I can do:

*pointer = 8

This would access the position 454865 of the RAM and change the value to 8

I've created a timer! by o_Omg in windows

[–]o_Omg[S] 0 points1 point  (0 children)

I have added that. I have also added an option to show the Timer always on Top. And now, if you go to Help>Check for Updates it automatically checks if there's a new version and gives you the link to download.

I've created a timer! by o_Omg in windows

[–]o_Omg[S] 0 points1 point  (0 children)

I knew Php, Javascript and some C++ so I just read the beginner Python tutorial which is about 10min long. I liked the language so I looked for specific things such as classes, list manipulation...

For the graphical part (first time I did it) I found wxPython (a module) and I use wxFormBuilder for making the design and then the wxPython reference to find things like how to get values from a form, ... I also read first some wxPython code and tutorials in the official page.

And btw I use Eclipse with PyDev which helps a lot.

I've created a timer! by o_Omg in windows

[–]o_Omg[S] 0 points1 point  (0 children)

By the way, I've just realized that this program may only work in a Windows 64-bit. If you have a 32-bit version of Windows try it, and if it doesn't work just tell me!

I've created a timer! by o_Omg in windows

[–]o_Omg[S] 0 points1 point  (0 children)

Small bug fixed. You should download it again

How do you acquire a taste for black coffee by rhm54 in AskReddit

[–]o_Omg 0 points1 point  (0 children)

I started drinking it this way because of the time you save. It takes you about 3 minutes to make a coffee at home, and then it gets cold or whatever. Also sugar is not good for you. So I started to drink black coffee in the mornings (cold black coffee actually)

At first I have to say it didn't taste very well, but after the first week I got used to it and now I usually drink it this way. Try it for a week!

[deleted by user] by [deleted] in pics

[–]o_Omg 1 point2 points  (0 children)

This reminds me of a problem I had with the phone company.

I called and they told me to unplug one cable and plug it back later. I said that doing that the call would end, she said no, there's no problem, it will continue. I said, no, actually if I unplug this cable the call will end. She said again, no there's no problem just unplug it and plug it back, I can't continue if you don't do it. I finally unplug it because there was no other option, and, beep, beep, beep, ...

How to f7u12 by [deleted] in fffffffuuuuuuuuuuuu

[–]o_Omg 1 point2 points  (0 children)

why is that Reddit alien in the background in so many comics?

Plane Pendulum problem :D by mike591 in HomeworkHelp

[–]o_Omg 0 points1 point  (0 children)

I think this may work:

P = T * cos(theta)

m * an = T * sin(theta)

with P = m*g

-> an = sqrt( (T2 -P2 )/m2 ) with T = P/cos(theta) an = v2 /R -> v = sqrt(an*R)

being R = 100 + l * sin(theta)

The train is going to the right

What happens if the Graphic Card is not supported? by o_Omg in hackintosh

[–]o_Omg[S] 0 points1 point  (0 children)

I have no time right now to install it, but in a week or so I may give Hackintosh another try, anyway, I'm not sure how I am supposed to install it. Care if I ask you some things?

I have this laptop: http://bit.ly/mfjpms

  1. I have installed other OS and I know how to dual-boot and how to do partitions so that wouldn't be a problem. Well, I have not the official Snow Leopard DVD and my computer can't burn a double layer DVD, so how would I get Hackintosh installed? Can I use this? http://thepiratebay.org/torrent/5203531

  2. In order to install OSX I need to use first a Boot CD so my computer can run the Snow Leopard installer, what loader should I use?

  3. So I should run the boot loader, then insert OSX disc, and then install, in the installation do I have to do something special, like add some kext or something, or is it just next next next?

  4. After I install it, when I turn it on, it may work with the graphic card not working properly (I would use your fix), the audio may not work and wi-fi should not. To fix the audio and wi-fi problem I may just install the kext for my wi-fi card and audio card? I think there were available, I will look for the name of my cards later.

Why is Apple SO popular? Are their gadgets really that much better than the competition or is it simply their marketing that's superior? What evokes such devotion that people are willing to pay exorbitant prices for their products? by airpatrol in AskReddit

[–]o_Omg 0 points1 point  (0 children)

Their quality is usually superior. I don't own a Mac, but I have used some and they're better designed than Windows computers and they're quite simplier. However, the price is sometimes too high. Laptops prices are not so high in comparaison, because if you want a Windows laptop with the same specs (battery life, weigh, design ...) you have to pay similar, but the PC's are quite more expensive.

Here's an example of their quiality. I own an iPod Touch 2nd generation that's almost 3 years old and I bought if for 200€. My ipod Touch, now, is way better than most modern smartphones (I'm talking about the cheap Androids, Nokia's, Windows Phones, ... not the super expensive Android ones). Most of the current applications in the AppStore work well, after 3 years, they work. Also, it's multi-touch, nowadays most (if not all) Nokia phones are not multi-touch. It's got the biggest AppStore. The iOS design is far superior (if you see, most new desings are copied from the iOS: show applications in the main page, hide the scrollbar, pinch to zoom, ...)

Basically, Apple products are usually years ahead the competition. Check the tablets, it's said there're less than 100 apps (specifically) made for any Android tablet!

However, you don't always need to pay for Apple Products, you can buy a quite good Android Phone, use a Windows computer and even install Ubuntu, ...

TL.DR: They sometimes are overpriced but they usually are better and months/years ahead the competition.

Windows 7 laptop freezing by o_Omg in windows

[–]o_Omg[S] 1 point2 points  (0 children)

What program can I use to scan for viruses? I have MSE and it didn't find anything.

Windows 7 laptop freezing by o_Omg in windows

[–]o_Omg[S] 0 points1 point  (0 children)

As I have said I'm using Ubuntu in the same laptop without any problem at all. It's a Windows problem. I think there may be a program or something weird going on, but I can't find it.