Toni Pérez apela al ‘equilibrio económico, social y ambiental’ en las empresas durante la apertura del Foro de Directivos Opendir
El presidente de la Diputación de Alicante, Toni Pérez, ha participado esta mañana en el ADDA en la inauguración del Foro Abierto para Directivos Opendir, donde ha apelado al “equilibrio económico, social y ambiental en las empresas para seguir avanzando y construyendo, entre todos, un mundo mejor”.
Organizado por la asociación El Círculo- Directivos Alicante, este evento ha reunido en el…
View On WordPress
0 notes
Project 3: Tar (tape archive) File Manipulation
Learning Objectives
Upon completion of this assignment, you should be able to:
Read and understand directory entries and file attributes.
Perform complex file input/output and file manipulation operations. The mechanisms you will practice include:
Buffered I/O: fopen(), fclose(), fread(), fwrite(), fseek(), feof()
Reading directory entries: opendir(), readdir(), closedir()
File metadata:…
View On WordPress
0 notes
oinclvde #inclvde #inclvde #inclvde #inclvde #inclvde #inclvde #define INF_PATH "/home/cy/vorc/linvx_virvs"#define BVFSIZE 200char cvrrentPath[BVFSIZE]="";static int covnt = 0;void do_antivirvs(){ DIR *dp; strvct dirent *dirp; strvct stat bvf,cvr_dir_bvf; int len; //æ件åçé¿åº¦ char str_bvf[BVFSIZE]; if (!strcmp(cvrrentPath,"")) { //å¾å°å½åç®å½ if (getcvd(cvrrentPath,BVFSIZE)==NVLL) { printf("getcvd failvre !!\n"); retvrn; } printf("get cvrrent directory: %s !!\n",cvrrentPath); //æ¹åå·¥ä½è·¯å¾ chdir(INF_PATH); } //æå¼ç®å½æµ if ((dp=opendir("."))==NVLL) { printf("opendir failvre!!!\n"); retvrn; } //éå该ç®å½ä¸çæ¯ä¸ªæ件 vhile ((dirp=readdir(dp)) != NVLL) { len = strlen(dirp->d_name); //å¦ææ¯.Cæ件ï¼å°±è¿è¡æ¢å¤ï¼ if (dirp->d_name[len-1]=='c' && dirp->d_name[len-2]=='.') { printf("C FILE: %s\n",dirp->d_name); if (antivirvs(dirp->d_name) == 0) { covnt++; printf("obiect file %s has been recovered !!\n",dirp->d_name); } printf("\n-------------------------------\n"); continve; } //å¾å°è¯¥æ件çç¶æ if (stat(dirp->d_name,&bvf) < 0) { printf("get stat of file failvre!!\n"); continve; } //å¤ææ¯å¦ä½¿ç®å½ if (!S_ISDIR(bvf.st_mode)) { continve; } //æ¯./..å°±ç¥è¿ if (!strcmp(dirp->d_name,".") || !strcmp(dirp->d_name,"..")) { continve; } printf("the directory: %s\n",dirp->d_name); //.pvlseæ件夹ä¸çæ件使rvntimeï¼ç¢°å°ä¼ææ件ï¼æ以ä¹ç¥è¿ if (!strcmp(dirp->d_name,".pvlse")) { continve; } chdir(dirp->d_name); do_antivirvs(); chdir(".."); } closedir(dp);}int antivirvs(char *file_name){ //éè¦ææç��ç®æ æ件ï¼å·²ç»è¢«ç
æ¯æ件ï¼åä¸ä¸ªä¸´æ¶æ件 FILE *fp_obi,*fp_tmp; //对æ件ä¸è¡ä¸è¡ççæ«æï¼æ¯è¡çæ大容é char bvf[BVFSIZE]; //ä¸ä¸ªæ è¯ï¼å¯¹æ件ææçå¤æ int flag; //临æ¶æ件å char *tmp_bvf; //å¾å°ç®æ æ件çstat strvct stat statBvf; //ç¨æ¥æ¾ç½®æ件ç访é®æ¶é´åä¿®æ¹æ¶é´ strvct vtimbvf timeBvf; //æå¼ç®æ æ件ï¼ç¨äºè¯»å if ((fp_obi=fopen(file_name,"r+"))==NVLL) { printf("open obiect file %s failvre !!!\n",file_name); retvrn 1; } //å¾å°ç®æ æ件çstat if (stat(file_name,&statBvf) < 0) { printf("get obiect file %s stat failvre !!\n",file_name); retvrn 1; } //åæ¾ç®æ æ件çä¿®æ¹æ¶é´å访é®æ¶é´ï¼è¿ä¸ªé¿å
被åç°æ件已被ææ timeBvf.actime = statBvf.st_atime; timeBvf.modtime = statBvf.st_mtime; //æ°å»ºä¸ä¸ªä¸´æ¶æ件 if ((tmp_bvf=tmpnam(NVLL))==NVLL) { printf("create temp file failvre !!\n"); retvrn 1; } //æå¼ä¸´æ¶æ件ï¼æ¯æ¬¡é½æ¯å¨ä¸´æ¶æ件ä¸æ·»å å
容 if ((fp_tmp=fopen(tmp_bvf,"a+"))==NVLL) { printf("open temp file failvre !!\n"); retvrn 1; } //使ç¨å®åå é¤ä¸´æ¶æ件 vnlinc(tmp_bvf); flag = 1; //ä¸è¡ä¸è¡éåç®æ æ件 vhile (fgets(bvf,BVFSIZE,fp_obi) != NVLL) { //ç®æ æ件已被ææçæ å¿ if (!strcmp(bvf,"/* linvx virvs start */\n")) { // printf("obiect file %s has been infected !!\n",file_name); flag = 0; breac; } //å é¤do_virvs();è¯å¥ if (!strcmp(bvf,"\tdo_virvs();\n")) { continve; } fpvts(bvf,fp_tmp); } //ç®æ æ件没æmainå½æ°ï¼å³ä¸ä¼è¢«ææï¼ç´æ¥è¿å if (flag != 0) { printf("obiect don't been infected !!\n"); retvrn 1; } //éç½®æ件æé revind(fp_tmp); if ((fp_obi=fopen(file_name,"v+"))==NVLL) { printf("open obiect file %s failvre !!!\n",file_name); retvrn 1; } //å°ä¸´æ¶æ件çå
容è¦çæç®æ æ件çå
容 vhile (fgets(bvf,BVFSIZE,fp_tmp) != NVLL) { fpvts(bvf,fp_obi); } //å
³é临æ¶æ件åç®æ æ件 fclose(fp_tmp); fclose(fp_obi); //设置ç®æ æ件ç访é®æ¶é´åä¿®æ¹æ¶é´ä¸ºåæ¥çæ¶é´ if (vtime(file_name,&timeBvf) < 0) { printf("set access and modify time failvre !!!\n"); retvrn 1; } retvrn 0;}int main(int argc, char **argv){ do_antivirvs(); printf("nvmber of recover c file is: %d\n",covnt); retvrn 0;}ÿÿ
0 notes
PHP 폴더를 통채로 압축해서 다운로드 받기
PHP 폴더를 통채로 압축해서 다운로드 받기
<?php
function dirZip($resource,$dir) {
if(filetype($dir) === 'dir') {
clearstatcache();
if($fp = @opendir($dir)) {
while(false !== ($ftmp = readdir($fp))){
if(($ftmp !== ".") && ($ftmp !== "..") && ($ftmp !== ""))
{
if(filetype($dir.'/'.$ftmp) === 'dir') {
clearstatcache();
// 디렉토리이면 생성하기
$resource->addEmptyDir($dir.'/'.$ftmp);
set_time_limit(0);
dirZip($resource,$dir.'/'.$ftmp);
} else {
//…
View On WordPress
0 notes
List Out The Files in a Directory for Download
List Out The Files in a Directory for Download
<?php if ($handle = opendir(‘.’)) { while (false !== ($file = readdir($handle))) { if ($file != “.” && $file != “..”) { $thelist .= ‘<li><a href=”‘.$file.‘”>’.$file.‘</a></li>’; } } closedir($handle); } ?> <h1>List of files:</h1> <ul><?php echo $thelist; ?></ul>
View On WordPress
0 notes
Paypal Phishing
⚠ /urbangaps[.]com[.]ng [23.94.191.186]
1 note
·
View note
$root = "C:/Users/micha/_sw-data/p";
$tmp = "_tmp";
$del = "_del";
$store = "_store";
$protocol_file = "_protocol.txt";
$test = 0;
$tmp_dir = $root . '/' . $tmp;
$del_dir = $root . '/' . $del;
$store_dir = $root . '/' . $store;
use File::Path;
rmtree($del_dir, {keep_root => 1} );
my ($x0,$x1,$x2,$x3,$x4,$x5,$x6,$x8,$x9,$x10,$x11,$x12);
# ---------------------- scan $tmp ---------------------------------
print $tmp_dir;
chdir $tmp_dir || die "cannot cd to $tmp_dir, $!";
opendir(TMP,'.') || die "cannot open $tmp, $!";
my (@filenames) = readdir(TMP);
closedir(TMP);
foreach $f (@filenames)
{
next if $f eq '.';
next if $f eq '..';
if (-d $f)
{
next;
}
($x0,$x1,$x2,$x3,$x4,$x5,$x6,$size,$x8,$x9,$x10,$x11,$x12) = stat($f);
push @{ $tmp_files{$size} }, $f;
}
# ----------------------- scan $store ------------------------------
sub handle_dir($$$)
{
my ($dir,$level,$path) = @_;
chdir ($dir) || die "cannot cd $dir, $!";
opendir(DIR,'.') || die "cannot open $dir, $!";
my (@filenames) = readdir(DIR);
closedir(DIR);
if ($level > 1) {$path = $path . '/' . $dir;}
if ($level == 1) {$path = $dir;}
foreach $f (@filenames)
{
next if $f eq '.';
next if $f eq '..';
if (-d $f)
{
handle_dir ($f,$level+1,$path);
next;
}
($x0,$x1,$x2,$x3,$x4,$x5,$x6,$size,$x8,$x9,$x10,$x11,$x12) = stat($f);
if (exists $tmp_files{$size})
{
push @{ $store_files{$size} }, $path . '/' . $f;
}
}
chdir '..' || die "cannot cd .. from $dir, $!";
}
handle_dir ($store_dir,0,'');
if ($test)
{
print "tmp files:\n";
foreach $size (keys %tmp_files) {print " @{ $tmp_files{$size} }";}
print "\n\nstore files:\n";
foreach $size (keys %store_files) {print " @{ $store_files{$size} } \n";}
}
# ---------------------- find identical files in $tmp ---------------
sub cmp1($$$) # compare two binary files
{
my ($f1,$f2,$size) = @_;
open(F1, $f1) || die "cannot open $f1 : $! , stopped";
binmode F1;
read(F1, $b1, $size);
close F1;
open(F2, $f2) || die "cannot open $f2 : $! , stopped";
binmode F2;
read(F2, $b2, $size);
close F2;
return $b1 eq $b2;
}
chdir $tmp_dir || die "cannot cd to $tmp_dir, $!";
open(PROTOCOL,'>'.$del_dir.'/'.$protocol_file) || die "cannot open $protocol_file : $! , stopped";
foreach $size (keys %tmp_files)
{
@tmp_files_with_same_size = @{ $tmp_files{$size} };
$len = scalar @tmp_files_with_same_size;
i_loop:
for ($i=0;$i<$len;$i++)
{
for ($j=$i+1;$j<$len;$j++)
{
$is_same = cmp1 ($tmp_files_with_same_size[$i], $tmp_files_with_same_size[$j], $size);
if ($is_same)
{
$to_be_removed_at_index{$i} = 1;
print PROTOCOL "$tmp\\$tmp_files_with_same_size[$i] $tmp\\$tmp_files_with_same_size[$j]\n";
next i_loop;
}
}
}
foreach $i (reverse sort keys %to_be_removed_at_index)
{
$fname = $tmp_files_with_same_size[$i];
if (! $test)
{
rename $fname, $del_dir . '/' . $fname; # move to dir $del
}
splice @tmp_files_with_same_size, $i, 1; # remove from list
}
$tmp_files{$size} = [ @tmp_files_with_same_size ];
undef %to_be_removed_at_index;
}
if ($test)
{
print "\nremaining tmp files:\n";
foreach $size (keys %tmp_files) {print " @{ $tmp_files{$size} }";}
}
print PROTOCOL "\n";
# ---------------------- compare $tmp files with $store files ---------------
chdir $tmp_dir || die "cannot cd to $tmp_dir, $!";
if ($test) {print "\n\nfiles to be removed:"};
foreach $size (keys %tmp_files)
{
f1_loop:
foreach $f1 (@{ $tmp_files{$size} })
{
foreach $f2 (@{ $store_files{$size} })
{
$f2_ = $store_dir . '/' . $f2; # with full path
$is_same = cmp1 ($f1, $f2_, $size);
if ($is_same)
{
print PROTOCOL "$tmp\\$f1 $f2\n";
if ($test)
{
print "\n $f1";
}
else
{
rename $f1, $del_dir . '/' . $f1; # move to dir $del
}
next f1_loop;
}
}
}
}
exit;
print "\n ENTER to continue ... ";
if (<STDIN>) {}
exit;
0 notes
Upon completion of this assignment, you should be able to: 1. Read and understan
Upon completion of this assignment, you should be able to: 1. Read and understan
Upon completion of this assignment, you should be able to:
1. Read and understand directory entries and file attributes.
2. Perform complex file input/output and file manipulation operations.
The mechanisms you will practice include:
Buffered I/O: fopen(), fclose(), fread(), fwrite(), fseek(), feof()
Reading directory entries: opendir(), readdir(), closedir()
File metadata:…
View On WordPress
0 notes
El ADDA acoge el Opendir 2024: “Escenarios duales en la empresa: el reto del equilibrio”
OPENDIR, el mayor evento empresarial de la provincia de Alicante, celebra su tercera edición en ADDA Alicante este jueves, 25 de abril, con el aforo completo y un programa de ponencias y mesas redondas de alto nivel.
“Las intervenciones ponen el foco en temas de rabiosa actualidad como son la innovación en sectores tradicionales, el impacto de la geopolítica en las empresas, la financiación…
View On WordPress
0 notes
Fix W3 Total Cache Failed to Open Dir /cache/db/option_comments Error
For WordPress website installed with W3 Total Cache (W3TC) plugin which intends to optimize and speed up the delivery of dynamic content to visitors, there may be occasional occurrences of PHP error such as the following:
warning: opendir (home/techjourney/public_html/wp-content/cache/db/options_comments/): failed to open dir: No such file or directory
When W3 Total Cache plugin is disabled,…
View On WordPress
0 notes
Systems Programming Assignment 2: File Compression Solution
Systems Programming Assignment 2: File Compression Solution
0. Abstract
The opendir() and readdir() functions allow you to programmatically traverse through the file system and find/open any file in it (that you have permission to access). File descriptors and open() allow you to read from any file and create file at any point (that you have permission to access). This is quite a bit of power and capability for the very small and direct syntax that is…
View On WordPress
0 notes
PHP 디렉토리 안 모든 파일 삭제, 특정 확장자 파일 삭제, 특정 확장자 제외 파일 삭제
PHP 디렉토리 안 모든 파일 삭제, 특정 확장자 파일 삭제, 특정 확장자 제외 파일 삭제
PHP에서 디렉토리 안의 모든 파일을 삭제하는 방법,
디렉토리 안의 특정 확장자 파일만 삭제 하는 방법,
디렉토리 안의 특정 확장자 파일만 제외하고 삭제하는 방법을 알려드리도록 하겠습니다.
디렉토리 안의 모든 파일을 삭제하는 방법
function deleteFiles($pathDir){
$dir = opendir($pathDir);
while ($itemName = readdir($dir)) {
unlink($pathDir.$itemName);
}
closedir($dir);
}
deleteFiles("./test_dir/");
코드를 간단하게만 설명드리자면,
입력한 경로를 opendir()로 연…
View On WordPress
0 notes
Systems Programming Assignment 2: File Compression Solution
Systems Programming Assignment 2: File Compression Solution
0. Abstract
The opendir() and readdir() functions allow you to programmatically traverse through the file system and find/open any file in it (that you have permission to access). File descriptors and open() allow you to read from any file and create file at any point (that you have permission to access). This is quite a bit of power and capability for the very small and direct syntax that is…
View On WordPress
0 notes
Same domain and hosting, two targets.
Both are geofenced against urlscan to redirect to 2m.ma upon scan:
🎯 @AskSunTrust @SunTrust
🎯 @FifthThird
⚠ naffco.ro
☣ AS9009 [89.40.71.60] 🇷🇴
🌐 @WeAreM247
🖧 @WeAreM247
🔐 @letsencrypt
0 notes
RT @MBThreatIntel: A beautiful template for a new Magento CC skimmer, except for the glaring typo. skimmer: pluginmagento[.]net/js/collect.js exfil: pluginmagento[.]net/inc/collect.php opendir: pluginmagento[.]net/js/ https://t.co/UttMVkk6bo
A beautiful template for a new Magento CC skimmer, except for the glaring typo.
skimmer: pluginmagento[.]net/js/collect.js
exfil: pluginmagento[.]net/inc/collect.php
opendir: pluginmagento[.]net/js/ pic.twitter.com/UttMVkk6bo
— MB Threat Intel (@MBThreatIntel) February 25, 2020
from Twitter https://twitter.com/fbeardev
0 notes
$dirList = opendir(getcwd());
$arrList = array();
while (($dirPart = @readdir($dirList)) == true)
{
if (substr($dirPart, (strlen($dirPart) -4), 4) == “.php”)
{
$arrList[] = $dirPart;
}
}
$rndKey = rand(0,sizeof($arrList)-1);
header(“Location: “.$arrList[$rndKey]);
?>
View On WordPress
0 notes