My Application

This is the place to post any code that you want to share with the community. Only completed scripts should be posted here.
Note: posts here are not necessarily endorsed by the community, and may represent amateur or even bad practices.

My Application

Postby SnakeGuru » Sun Jul 24, 2016 1:18 pm

8-) Hello im SnakeGuru from Technolgy Exposed 8-)
And no we still dont have website :(

App:Ultimate dev Windows 10, Python 2.7
Today im showing you my app.It will be released soon so this is kinda pre realise. :!:
It is called UltimateDev it is still work in progress and when im done it will be epic.
When i started developing this app it was supposed to be virus scripting tool. :twisted:
But i gave up.
Now it is tool that is supposed to help developers to develop thier apps.
Mostly with py2exe wich i implemented in this app.
It needs 5 extra folders to run(All created by me.):
1.pyConvert.py
2.runPy2exe.bat
3.matrix.bat
4.matrixSmall.bat
5.EULA.txt
Hope you like it ;) .
And here are the codes.
1.UltimateDev.py
Code: Select all
import os
from time import sleep


def getOsCommand():
   osCommand = raw_input('os command >>')
   if(osCommand == 'exit'):
      getCommand()
   elif(osCommand == "cls"):
      os.system("cls")
      print 'Thank you for using ULTIMATE DEV, made by Technology Exposed'
      getOsCommand()
   elif(osCommand == "help"):
      print "Listing all custom commands(if you want to acces normal help please type help -os)"
      print "-------------------------------------------------------------------------------------"
      print "1. exit: goes back to cllasic ULTIMATE DEV"
      print "-------------------------------------------------------------------------------------"
      print "Some more will be added soon"
      getOsCommand()
   elif(osCommand == "help -os"):
      os.system("help")
      getOsCommand()
   elif(osCommand != 'exit' or "cls" or "help"):
      print(os.system(osCommand))
      getOsCommand()
   


def reRun():
   os.system("start UltimateDev.py")
   

def init():
   print "By using this software you agree automaticly agree to EULA. You  can check eula i your installation path(default: C:\UltimateDev) or by running the command 'EULA'"
   sleep(3)
   os.system('cls')
   print 'Thank you for using ULTIMATE DEV, made by Technology Exposed'
   getCommand()

def getCommand():

   command = raw_input('>>')
   if(command == 'new txt'):
      directoryTxt = raw_input('Enter directory for txt file: ')
      nameTxt = raw_input('Enter name for txt file: ')
      f = open(directoryTxt + nameTxt + '.txt', 'w')
      print('txt file created at ' + directoryTxt)
      f.close()
      getCommand()
   elif(command == 'dir'):
      some = os.popen('dir').read()
      print some
      getCommand()
   elif(command == "EULA"):
      eula = os.popen('type EULA.txt').read()
      print eula
      getCommand()
   elif(command == 'os'):
      getOsCommand()
   elif(command == 'read txt'):
      directoryReadTxt = raw_input('Enter directory for file you want to read: ')             
      contentTxt = os.popen('type ' + directoryReadTxt).read()
      if(contentTxt == ""):
         print "ERROR: It seems like you entered wrong directory or the txt was empty"
         getCommand()
      else:
         print contentTxt
         getCommand()
      getCommand()
   elif(command == 'start'):
      startAppDir = raw_input('Enter directory for app you want to run: ')
      os.system('start ' + startAppDir)
      getCommand()
       
   elif(command == 'cls'):
      os.system('cls')
      print 'Thank you for using ULTIMATE DEV, made by Technology Exposed'
      getCommand()
      
   elif(command == "matrix"):
       os.system("color a")
       print "Welcome to the matrix!"
       sleep(1)
       os.system('start matrix.bat')
       os.system("color f")
       getCommand()   
   elif(command == 'matrix -s'):
      os.system('color a')
      print "Welcome to the matrix" 
      sleep(1)
      os.system('start matrixSmall.bat')
      os.system('color f')
      getCommand()
   elif(command == 'exit'):
      return False

   
   elif(command != 'add txt' or 'exit' or 'os' or 'start' or 'color' or 'cls' or 'dir' or 'matrix' or 'EULA' or 'matrix -s'):
      os.system('color c')
      print 'ERROR: please enter valid command'
      sleep(0.5)      
      os.system("color f")
      getCommand()

os.system('color f')
init()

2.runPy2exe.bat
Code: Select all
python pyConvert.py py2exe

3.matrix.bat
Code: Select all
@echo off
mode con: cols=60 lines=30
color a
:matrix
echo %random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%%random%
goto matrix

4.pyConvert.py
Code: Select all
from distutils.core import setup
import py2exe
import sys
import time


def getDir():
    dir = raw_input("Enter directory>> ")
    setup(console=[dir])       
    sys.exit()
   
print "Ultimate Dev uses py2exe o convert files for more info about py2exe please visit www.py2exe.org"
getDir()



EULA.txt
Code: Select all
EULA is still work in progress


I created this all of this in 1h. Yes i am kinda geek. :geek:
Technolgy Exposed wishes you
Last edited by Yoriz on Sun Jul 24, 2016 2:22 pm, edited 1 time in total.
Reason: First post lock.
SnakeGuru
 
Posts: 2
Joined: Sun Jul 24, 2016 12:42 pm

Re: My Application

Postby Ofnuts » Sun Jul 24, 2016 5:24 pm

Uh?
This forum has been moved to http://python-forum.io/. See you there.
User avatar
Ofnuts
 
Posts: 2659
Joined: Thu May 14, 2015 9:46 am
Location: Paris, France, EU, Earth, Solar system, Milky Way, Local Cluster, Universe #32987440940987

Re: My Application

Postby micseydel » Sun Jul 24, 2016 7:26 pm

Besides the unusual style for Python code, it seems you have basic logic errors, e.g.
Code: Select all
elif(osCommand != 'exit' or "cls" or "help"):

This probably doesn't do what you intend. pyConvert.py is a good example of bad code as well.

Besides the actual content of the code, someone reported your thread I suppose because you mentioned trying to make this useful for creating viruses. I closed the report because your saying it didn't really make any sense.

That said, though I generally want to be supportive and encouraging of people learning Python, your post is really embarrassing. You act like we should already have heard of Technolgy Exposed as some underground thing (is that why "technology" is misspelled intentionally?) when you seem like a script kiddie. We don't look kindly on malicious coding here, so you only barely get a pass on mentioning viruses as something you want to do. We also want to be supportive of an international community, so are pretty forgiving with non-native English speakers, but you seem to try to be acting like a badass but all the misspellings really detract from that. Also, speaking of this code only taking an hour isn't cool either, especially when the code is crap, and the tool doesn't actually seem worth learning to use.

If you want to learn Python and do good things with it, great. As far as I'm concerned you can still ask questions here (as long as you do so properly) but if you just make posts like this, you won't be welcome here.
Due to the reasons discussed here we will be moving to python-forum.io on October 1, 2016.

This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
micseydel
 
Posts: 3000
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: My Application

Postby SnakeGuru » Mon Jul 25, 2016 12:01 pm

:oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops:

Im sorry im new to the python.
Im used to the java and assambly 8086 programming.
And can you please tell me how can i improve my code?

Thanks.
SnakeGuru
 
Posts: 2
Joined: Sun Jul 24, 2016 12:42 pm

Re: My Application

Postby Ofnuts » Mon Jul 25, 2016 1:41 pm

SnakeGuru wrote:And can you please tell me how can i improve my code?

Yes:

  • be modest and apply a healthy dose of self-criticism.
  • read other people's code. Among other things, Python being open source, the source code of most Python modules is already on your PC. Otherwise, there are plenty of Python projects to read on GitHub.
This forum has been moved to http://python-forum.io/. See you there.
User avatar
Ofnuts
 
Posts: 2659
Joined: Thu May 14, 2015 9:46 am
Location: Paris, France, EU, Earth, Solar system, Milky Way, Local Cluster, Universe #32987440940987

Re: My Application

Postby micseydel » Mon Jul 25, 2016 6:02 pm

SnakeGuru wrote:And can you please tell me how can i improve my code?

Start by testing it. I mentioned one problem that appears more than once in your code, which testing should would found. Then clean up your code with a linter - for example, pyConvert.py has at least one unused import (things like this that can be detected automatically should be detected automatically before code review).

Lastly, I recommend PEP 8 for your style, though if you choose something else just make sure to be consistent, and I recommend either documenting it or documenting a link to an external style documentation.
Due to the reasons discussed here we will be moving to python-forum.io on October 1, 2016.

This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
micseydel
 
Posts: 3000
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA


Return to Completed Scripts

Who is online

Users browsing this forum: No registered users and 4 guests