예제 #1
0
 def _nice(self):
     if self.__NICE is None:
         self.__NICE = 10
     if self.__NICE < -20:
         self.__NICE = -20
     if self.__NICE > 19:
         self.__NICE = 19
     try:
         os.nice(self.__NICE)
         common.notice(
             'Set lowest priority for the global process execution')
     except Exception as e:
         common.warn('Setting niceness failed: %s' % str(e))
예제 #2
0
 def notice(self, txt, code=None):
     common.notice(txt, code=code)
예제 #3
0
 def onSettingsChanged(self):
     common.notice(
         "Settings have been updated and will trigger re-loading of slideshow collection workflow"
     )
     self.updateSettingsMethod()
예제 #4
0
                    'title':1, \
                    'date_posted':1, \
                    'date_activity':1, \
                    'num_replies':1, \
                    'score':1, \
                    'num_votes':1, \
                    'downloads':1, \
                    'solver':1
                }

            common.posts_display(crackmes, fields)
        else:
            print '<p>(no crackmes yet exist from this user)</p>'

    except Exception, e:
        common.notice(str(e))

###############################################################################
# edit a profile
###############################################################################
elif fs['op'].value == 'pe':
    try:
        page.startPage()

        if not 'user' in fs:
            raise Exception('ERROR: missing \'user\' from form data')
        user = fs['user'].value

        if not creds:
            raise Exception(
                'ERROR: you must be logged in to edit your profile')
예제 #5
0
 def notice(self, text):
     common.notice(text)
예제 #6
0
form = cgi.FieldStorage()
op = ''
if 'op' in form:
    op = form['op'].value

backpage = ''
if 'r' in form:
    backpage = base64.b64decode(form['r'].value)

page = common.PageLayout()

# main()
creds = check_logged_in()
if not creds:
    page.startPage()
    common.notice('You must be logged in to post.<br>\n \
                    Click to the <a href=login.py>login page</a>\n')

elif op == '':
    page.startPage()
    common.notice('This page is not meant to be invoked alone.\n')

elif op == 'pc':
    page.startPage()
    print '''
    <h3>Guidelines:</h3>
    <ul>
    <li>only zip/gzip/rar attachment allowed</li>
    <li>please do not include your name in crackme title (eg: "Foo's Crackme #1")</li>
    <li>describe precisely what is required of a valid solution</li>
    </ul>
    '''