shell bypass 403

UnknownSec Shell

: /bin/ [ dr-xr-xr-x ]

name : bno_plot.py
#!/usr/libexec/platform-python
#
# btt blkno plotting interface
#
#  (C) Copyright 2008 Hewlett-Packard Development Company, L.P.
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
"""
bno_plot.py
	[ -h | --help       ]
	[ -K | --keys-below ]
	[ -v | --verbose    ]
	[ <file...>         ]

Utilizes gnuplot to generate a 3D plot of the block number output
from btt.  If no <files> are specified, it will utilize all files
generated after btt was run with -B blknos (meaning: all files of the
form blknos*[rw].dat).

The -K option forces bno_plot.py to put the keys below the graph,
typically all keys for input files are put in the upper right corner
of the graph. If the number of devices exceed 10, then bno_plot.py will
automatically push the keys under the graph.

To exit the plotter, enter 'quit' or ^D at the 'gnuplot> ' prompt.
"""

from __future__ import absolute_import
from __future__ import print_function
import getopt, glob, os, sys, tempfile

verbose	= 0
cmds	= """
set title 'btt Generated Block Accesses'
set xlabel 'Time (secs)'
set ylabel 'Block Number'
set zlabel '# Blocks per IO'
set grid
"""


#-----------------------------------------------------------------------------
def parse_args(in_args):
	global verbose

	keys_below = False
	s_opts = 'hKv'
	l_opts = [ 'help', 'keys-below', 'verbose' ]

	try:
		(opts, args) = getopt.getopt(in_args, s_opts, l_opts)
	except getopt.error as msg:
		print(msg, file=sys.stderr)
		print(__doc__, file=sys.stderr)
		sys.exit(1)

	for (o, a) in opts:
		if o in ('-h', '--help'):
			print(__doc__)
			sys.exit(0)
		elif o in ('-v', '--verbose'):
			verbose += 1
		elif o in ('-K', '--keys-below'):
			keys_below = True

	if len(args) > 0:	bnos = args
	else:			bnos = glob.glob('blknos*[rw].dat')

	return (bnos, keys_below)

#-----------------------------------------------------------------------------
if __name__ == '__main__':
	(bnos, keys_below) = parse_args(sys.argv[1:])

	if verbose:
		print('Using files:', end=' ')
		for bno in bnos: print(bno, end=' ')
		if keys_below:	print('\nKeys are to be placed below graph')
		else:		print('')

	tmpdir = tempfile.mktemp()
	os.mkdir(tmpdir)

	plot_cmd = None
	for f in bnos:
		t = '%s/%s' % (tmpdir, f)

		fo = open(t, 'w')
		for line in open(f, 'r'):
			fld = line.split(None)
			print(fld[0], fld[1], int(fld[2])-int(fld[1]), file=fo)
		fo.close()

		t = t[t.rfind('/')+1:]
		if plot_cmd == None: plot_cmd = "splot '%s'" % t
		else:                plot_cmd = "%s,'%s'" % (plot_cmd, t)

	fo = open('%s/plot.cmds' % tmpdir, 'w')
	print(cmds, file=fo)
	if len(bnos) > 10 or keys_below: print('set key below', file=fo)
	print(plot_cmd, file=fo)
	fo.close()

	pid = os.fork()
	if pid == 0:
		cmd = 'gnuplot %s/plot.cmds -' % tmpdir

		if verbose: print('Executing %s' % cmd)

		os.chdir(tmpdir)
		os.system(cmd)
		sys.exit(1)

	os.waitpid(pid, 0)
	os.system('/bin/rm -rf ' + tmpdir)

© 2025 UnknownSec
Web Design for Beginners | Anyleson - Learning Platform
INR (₹)
India Rupee
$
United States Dollar
Web Design for Beginners

Web Design for Beginners

in Design
Created by Linda Anderson
+2
5 Users are following this upcoming course
Course Published
This course was published already and you can check the main course
Course
Web Design for Beginners
in Design
4.25
1:45 Hours
8 Jul 2021
₹11.80

What you will learn?

Create any website layout you can imagine

Support any device size with Responsive (mobile-friendly) Design

Add tasteful animations and effects with CSS3

Course description

You can launch a new career in web development today by learning HTML & CSS. You don't need a computer science degree or expensive software. All you need is a computer, a bit of time, a lot of determination, and a teacher you trust. I've taught HTML and CSS to countless coworkers and held training sessions for fortune 100 companies. I am that teacher you can trust. 


Don't limit yourself by creating websites with some cheesy “site-builder" tool. This course teaches you how to take 100% control over your webpages by using the same concepts that every professional website is created with.


This course does not assume any prior experience. We start at square one and learn together bit by bit. By the end of the course you will have created (by hand) a website that looks great on phones, tablets, laptops, and desktops alike.


In the summer of 2020 the course has received a new section where we push our website live up onto the web using the free GitHub Pages service; this means you'll be able to share a link to what you've created with your friends, family, colleagues and the world!

Requirements

No prerequisite knowledge required

No special software required

Comments (0)

Report course

Please describe about the report short and clearly.

Share

Share course with your friends