From: Metabox Date: Fri, 28 Jun 2019 12:37:33 +0000 (+1000) Subject: del X-Git-Url: https://lifelog.hopto.org/gitweb/?a=commitdiff_plain;h=ee9e4e8dbd87db2e1c3d1d96878c79a85d286fd4;p=LifeLog.git del --- diff --git a/htdocs/cgi-bin/tempCodeRunnerFile.cgi b/htdocs/cgi-bin/tempCodeRunnerFile.cgi deleted file mode 100644 index 58ddcc1..0000000 --- a/htdocs/cgi-bin/tempCodeRunnerFile.cgi +++ /dev/null @@ -1,175 +0,0 @@ -#!/usr/bin/perl -# -# Programed in vim by: Will Budic -# Open Source License -> https://choosealicense.com/licenses/isc/ -# -use strict; -use warnings; -use DBI; -#DEFAULT SETTINGS HERE! -our $LOG_PATH = '/home/will/dev/LifeLog/dbLifeLog/'; - - -#END OF SETTINGS - - -my @cre; - - open(my $fh, '<', '/home/will/dev/LifeLog/htdocs/cgi-bin/main.cnf' ) or die "Can't open main.cnf: $!"; - while (my $line = <$fh>) { - chomp $line; - if(rindex ($line, "<", 14; - my $crest = substr $line, 13, $end - 13; - @cre = split '/', $crest; - if(@cre &&scalar(@cre)>1){ - print @cre; last; - } - - } - } - close $fh; - - if(scalar(@cre)>1){ - - my $database = $LOG_PATH.'data_'.$cre[0].'_log.db'; - my $dsn= "DBI:SQLite:dbname=$database"; - my $db = DBI->connect($dsn, $cre[0], $cre[1], { RaiseError => 1 }) - or die "

Error->

"; - #check if enabled. - my $st = $db->prepare("SELECT VALUE FROM CONFIG WHERE NAME='AUTO_LOGIN';"); - $st->execute(); - my @set = $st->fetchrow_array(); - print $set[0]; - if($set[0] eq "0"){ - my $alias = $cre[0]; - my $passw = $cre[1]; - } - else{ - print "sucks cock!" - } - } -=Comm -my $fh; -my $inData = 0; -open( $fh, "<:perlio", '/home/will/dev/LifeLog/htdocs/cgi-bin/main.cnf' ) - or die "Can't open main.cnf: $!"; -read $fh, my $content, -s $fh; -my @lines = split '\n', $content; -my %vars = (); -my $table_type = 0; -foreach my $line (@lines) { - - #chomp $line; - - my @tick = split( "`", $line ); - - if( index( $line, '< $line\n"; - } - else { - $vars{$id} = $name; - print "CNF->[$id]->$name:$value -> $tick[1]\n"; - $inData = 1; - } - } - } - else { - print "3Corrupt Entry -> $line\n"; - } - } - } - else { - if($table_type==0){ - print "2Corrupt Entry -> $line\n"; - } - else{ - my @pair = $tick[0] =~ m[(\S+)\s*\|\s*(\S+)]g; - if ( scalar(@pair)==2 ) { - my $id = $pair[0]; - my $name = $pair[1]; - print "CAT-> [$id]->$name [[ $tick[1] ]]\n"; - } - else { - print "3Corrupt Entry -> $line\n"; - } - } - } - } - elsif ( $inData && length($line) > 0 ) { - if ( scalar(@tick) == 1 ) { - print "Corrupt Entry, no description supplied -> $line\n"; - } - else { - print "1Corrupt Entry -> $line\n"; - } - } - -} -close $fh; -=cut - -=comment - - for my $key (keys %pv) { - my %id = $key =~ m[(\s*)\|(\s*)]g; - - } - - -use LWP::UserAgent; -use File::Basename; - -my $lwp = LWP::UserAgent->new(agent=>' Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0', cookie_jar=>{}); - -my $link = 'http://cdn.chv.me/images/thumbnails/7_Inch_Android_4_0_Tablet_zzMn_tSh.jpg.thumb_70x70.jpg'; -my $file = fileparse $link; - -my $resp = $lwp->mirror($link, "/home/will/dev/LifeLog/htdocs/cgi-bin/images/$file"); - -unless($resp->is_success) { - print $resp->status_line; -} - -#my $log ="Kurac palac deci davac. < reached.\n"; -my $log = -"Test < reached.<\n"; -=cut - -=comment - if($log =~ /<', $idx); - my $sub = substr($log,$idx+1,$len-$idx-1); - my $url = qq("); - #$tags .= qq(\n); - $log=~s/</$url/o; - } - - -if($log =~ /<', $idx)-8; - my $sub = "

".substr($log,$idx+8,$len-$idx)."

"; - $log=~s/</$sub/gsi; - $log=~s/< -My name is Cutie! -=cut