May 23, 2017, 11:48:03 AM
Welcome, Guest. Please login or register.

There are two rules for success: #1 Never Tell Everything You Know.

Author Topic: Started whit python  (Read 3324 times)

uSploit

  • Guest
Started whit python
« on: July 16, 2013, 03:13:18 AM »
This is one of my first programs in python.

i know its nothing yet its what ive learnd from the first 30 pages and combined into something in my mind.
Code: [Select]
# Filename: earnings.py

#integer inputs
rich = 10000
earnings = int(input('earnings each week:')) # input for weekly earnings.
premies = int(input('total premies:')) # input for premies you get.
monthcosts = int(input('monthly bills:')) # monthly bills.
personalbills = int(input('personal bills:')) # personal bills.
yearpay = int(input('yearly bills:')) # yearly bills.

if rich < earnings*4:
     print('time to give money to the poor!') # first integer rich = 10000 is a joke for if you earn more then 5000 a month your safe in my eyes.
   
#the printout with the format to calculate all settings we need.
     # monthly earnings, yearly earnings
print('Your total monthly earnings: {0} EUR \
Your total monthly payments: {1} EUR \
Monthly savings: {2} EUR \
Yearly savings: {3} EUR \
Yearly payments : {4} EUR \
yearly savings {3} - yearly payments: {4} + premies {5}\
Your total yearly savings are: {6} \
 '.format(earnings * 4, monthcosts + personalbills, (earnings * 4) - (monthcosts + personalbills),
         ((earnings * 4) - (monthcosts + personalbills))*12, yearpay, premies, ((earnings * 4) - (monthcosts + personalbills))*12 - yearpay + premies))
i know very basic easy language to write really!
What do you think?

uSploit

  • Guest
Re: Started whit python
« Reply #1 on: July 18, 2013, 02:36:10 PM »
I'm really advancing fast in python! Read over, read over understanding it all, its really a great language.
Started building an SQL injector with a vulnerability scanner all together. Anyway that's still at basic stages.
The vulnerability scanner is coming along quite well. I viewed a few others before i started (not copy pasting any code) really writing my own :)).

Offline R4v3N

  • Administrator
  • Super Elite
  • *****
  • Posts: 3691
  • Internets: +160/-1
  • The googles and the metasploits...
    • Top-Hat-Sec
Re: Started whit python
« Reply #2 on: July 18, 2013, 07:32:30 PM »
Usploit. Python IS awesome man and there are so many free tutorials and videos out there online to help people learn. Keep at it man.

uSploit

  • Guest
Re: Started whit python
« Reply #3 on: July 19, 2013, 03:03:11 AM »
Yeh really awesome :) BTW rewrote the simple program i first made.
Just for practice and gething used to all the stuff :)

My first way of doing it really looks ugly so this is it:
Code: [Select]
#!/usr/bin/python
# Filename: earnings.py

#-------------#
#--variables--#

# Input variables
rich = 10000
earnings = int(input('earnings each week:')) # Input for weekly earnings.
monthley_bills = int(input('monthly bills:')) # Monthly bills.
personal_bills = int(input('personal bills:')) # Personal bills.
yearly_paymenths = int(input('yearly paymenths:')) # Yearly bills.
monthley_premiums = int(input('monthley premiums you earn:')) # Monthley premiums you earn.
yearly_premiums = int(input('yearly premiums you earn:')) # Yearly premiums you earn.

# Calculating the variables
monthley_earnings = earnings * 4
total_monthley_paymenths = monthley_bills + personal_bills
monthley_savings = (earnings * 4) - (monthley_bills + personal_bills) + monthley_premiums
yearly_earnings = (earnings * 4) *12
yearly_savings = ((earnings * 4) - (monthley_bills + personal_bills))*12 - yearly_paymenths + monthley_premiums + yearly_premiums
total_premiums = monthley_premiums + yearly_premiums

#-------------#
#-MainProgram-#

if rich <= earnings*4:
     print('time to give money to the poor!') # First integer rich = 10000 is a joke..
   
# Now the printout for this program:
print "You earned", monthley_earnings, "EUR this month."
print "You have to pay", total_monthley_paymenths, "EUR this month."
print "You saved", monthley_savings, "EUR this month."
print "You earned", yearly_earnings, "EUR this year."
print "You saved", yearly_savings, "EUR this year."
print "You earned", total_premiums, "EUR on premiums this year."

print "done"

# End of program.
« Last Edit: July 19, 2013, 03:15:04 AM by uSploit »

Offline c0ldg0ld

  • Si Vis Pacem, Para Bellum
  • Global Moderator
  • Elite
  • *****
  • Posts: 524
  • Internets: +34/-0
    • Public Key
Re: Started whit python
« Reply #4 on: July 19, 2013, 05:21:51 AM »
That's awesome, I'm starting to learn it as well.  I've got several free books from posts on the forum and just bought one called Violent Python that is looking very interesting as I go through it.
rm -rf /bin/laden

Time is an illusion. Lunchtime doubly so.


Public Key

uSploit

  • Guest
Re: Started whit python
« Reply #5 on: July 19, 2013, 05:24:39 PM »
I am using learning python the hard way.
Exercises are the real learning. At least for me it is.

I have read a byte of python as well. (Only to get into it).
Means I haven’t been doing great programming over there but learned all the names of the things example variables strings modules how to use them name them and so on.

When I knew most of that i started learn python the hard way which is really good. Since i got everything i needed from the previous book.
I'm really doing great at all the exercises and at a fast rate as well!  I by the way got my own way of coding in every language i use.
I think everyone has this, although i try to combine the most clean ways to do things.

I use a lot of comments but try to keep my code clean so not to much either.

If you start learning python c0ldg0ld pm me :) we might be able to learn from each other as well.

Greetings uSploit.

Offline c0ldg0ld

  • Si Vis Pacem, Para Bellum
  • Global Moderator
  • Elite
  • *****
  • Posts: 524
  • Internets: +34/-0
    • Public Key
Re: Started whit python
« Reply #6 on: July 19, 2013, 08:36:49 PM »
I am using learning python the hard way.
Exercises are the real learning. At least for me it is.

I have read a byte of python as well. (Only to get into it).
Means I haven’t been doing great programming over there but learned all the names of the things example variables strings modules how to use them name them and so on.

When I knew most of that i started learn python the hard way which is really good. Since i got everything i needed from the previous book.
I'm really doing great at all the exercises and at a fast rate as well!  I by the way got my own way of coding in every language i use.
I think everyone has this, although i try to combine the most clean ways to do things.

I use a lot of comments but try to keep my code clean so not to much either.

If you start learning python c0ldg0ld pm me :) we might be able to learn from each other as well.

Greetings uSploit.

Will do.  I've been actually going back to the local tech school that I graduated from (years ago) to learn C++.  Programming seemed to be the one area in "computing" that I couldn't really break into without a little guidance to start with.  Having gone through intro to C++ and now 3/4 of the way through advanced I'm able to look at Python and go "yeah I know what an exception handler is" and "yeah, I understand all the data types and database integration" etc. Just needed a foot in the door.  Now I'm moving on to Objective C (because I want to make a shitload of money by telling people they need to fling birds at pigs or something like that) and at the same time I want to be learning Python for more practical uses like managing my Asterisk servers and automating stuff at work.  I'll check out "Python the hard way" when I get a foundation.  I'm with you, exercises are how I learn.  That's why I went out and actually took the C++ classes.  I have to have a challenge or a problem to solve in order to learn it.  If it's just free time, well I have a long list of projects I need to complete and it won't get done!
rm -rf /bin/laden

Time is an illusion. Lunchtime doubly so.


Public Key

uSploit

  • Guest
Re: Started whit python
« Reply #7 on: July 20, 2013, 01:55:54 AM »
Sounds cool. I know Java, c#, php, mysql, http(easy as phu), started with python and, really interested in c and assembly :) c++ will be my last one since I think its the hardest to learn.
If I already know a few languages it might get easier for me to do so.

Good to know you know these :D. Im planning on re learning c# since its been a long while I have used it. They say it wont take long to get back into so :) I want to write a huge bot-net xp.
And a whole range of pen testing tools. Yeh, sorry anything in my mind all ways goes that direction. I have been thinking on preventing it as well but oh well only security experts whit a whole range of certificates get these jobs. Meaning i wont get far with my certificate auto mechanics :)...

Always wanted to get a job in computer stuff never got the chance.
I'm learning things that shouldnt see daylight :) yeh talking about my 0days ^^.
« Last Edit: July 20, 2013, 01:57:50 AM by uSploit »

Offline Asphyrin

  • Prospect
  • *
  • Posts: 4
  • Internets: +0/-0
  • “A goal without a plan is just a wish"
Re: Started whit python
« Reply #8 on: September 04, 2013, 07:59:02 AM »
hi
i have a simple question
i have all the documents for building an software ..but i don;t know where to start ..and witch language to do it .. i want to build one software but i don;t know anything of codding

Offline Cardiacz

  • Prospect
  • *
  • Posts: 27
  • Internets: +4/-0
  • #NotAFed
Re: Started whit python
« Reply #9 on: September 04, 2013, 07:16:43 PM »
hi
i have a simple question
i have all the documents for building an software ..but i don;t know where to start ..and witch language to do it .. i want to build one software but i don;t know anything of codding

If you want to learn python, which is a great language to learn, you can go here http://www.codecademy.com/
Follow me on Twitter @THS_Cardiacz :D

Offline Asphyrin

  • Prospect
  • *
  • Posts: 4
  • Internets: +0/-0
  • “A goal without a plan is just a wish"
Re: Started whit python
« Reply #10 on: September 06, 2013, 05:39:17 AM »
Thank you very much
:)
this is what i need ..something like this to help me ..not only reading books :D

thank you again

Offline Cardiacz

  • Prospect
  • *
  • Posts: 27
  • Internets: +4/-0
  • #NotAFed
Re: Started whit python
« Reply #11 on: September 06, 2013, 01:47:10 PM »
Thank you very much
:)
this is what i need ..something like this to help me ..not only reading books :D

thank you again

You are very welcome :)
Follow me on Twitter @THS_Cardiacz :D

Re: Started whit python
« Reply #12 on: September 12, 2013, 06:24:50 PM »
Thank you very much
:)
this is what i need ..something like this to help me ..not only reading books :D

thank you again

You are very welcome :)

Hi some asshole mod deleted my earlier post but all it said was thank you for the Link!

SIPA and PIPA would feel right at home here..

Offline GalaxyNinja

  • Global Moderator
  • Elite
  • *****
  • Posts: 1710
  • Internets: +94/-0
  • My password is **********
Re: Started whit python
« Reply #13 on: September 12, 2013, 06:59:48 PM »
D4rkcat, the asshole mod who deleted your post was me. I didn't see a "thank you," I saw two pieces of quoted text. Please make sure that if you quote someone you do not reply Inside the quote, as it then doesn't look like you reply at all.
We have had issues before with people just quoting text and I thought that was what was going on.
And watch your language please...  This forum is much nicer than most other forums in terms of helpfullness. Please make sure you read and follow the forum rules:  http://top-hat-sec.com/forum/index.php?board=60.0
Thanks, GalaxyNinja
« Last Edit: September 12, 2013, 07:08:31 PM by GalaxyNinja »

Offline V0id

  • Enthusiast
  • **
  • Posts: 60
  • Internets: +4/-1
Re: Started whit python
« Reply #14 on: September 16, 2013, 04:03:03 AM »
lol, thats funny :D

people flip out at anything these days, some guy deleted my "thank you" post, so ipso facto they're an A$$H0L3, lol

P.S its SOPA and PIPA,  :) not SIPA and PIPA