Tumgik
#Opendir
12endigital · 5 months
Text
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…
Tumblr media
View On WordPress
0 notes
myprogrammingsolver · 5 months
Text
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:…
Tumblr media
View On WordPress
0 notes
auroroboros1 · 1 year
Text
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
shinboardnet · 2 years
Text
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
smartupworld · 2 years
Text
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
spamreports · 4 years
Photo
Tumblr media Tumblr media Tumblr media
Paypal Phishing
⚠ /urbangaps[.]com[.]ng [23.94.191.186]
1 note · View note
Text
$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
essaynook · 3 years
Text
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
12endigital · 5 months
Text
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…
Tumblr media
View On WordPress
0 notes
almohamady-blog · 5 years
Text
Fix W3 Total Cache Failed to Open Dir /cache/db/option_comments Error
Tumblr media
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
programmingsolver · 4 years
Text
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
shinboardnet · 2 years
Text
PHP 디렉토리 안 모든 파일 삭제, 특정 확장자 파일 삭제, 특정 확장자 제외 파일 삭제
PHP 디렉토리 안 모든 파일 삭제, 특정 확장자 파일 삭제, 특정 확장자 제외 파일 삭제   PHP에서 디렉토리 안의 모든 파일을 삭제하는 방법, 디렉토리 안의 특정 확장자 파일만 삭제 하는 방법, 디렉토리 안의 특정 확장자 파일만 제외하고 삭제하는 방법을 알려드리도록 하겠습니다. 디렉토리 안의 모든 파일을 삭제하는 방법 function deleteFiles($pathDir){ $dir = opendir($pathDir); while ($itemName = readdir($dir)) { unlink($pathDir.$itemName); } closedir($dir); } deleteFiles("./test_dir/");   코드를 간단하게만 설명드리자면, 입력한 경로를 opendir()로 연…
Tumblr media
View On WordPress
0 notes
myprogrammingsolver · 4 years
Text
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
spamreports · 4 years
Photo
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
Same domain and hosting, two targets.
Both are geofenced against urlscan to redirect to 2m.ma upon scan:
Tumblr media
🎯  @AskSunTrust @SunTrust 🎯  @FifthThird
⚠ naffco­.ro
☣ AS9009 [89.40.71.60] 🇷🇴
🌐 @WeAreM247 🖧 @WeAreM247 🔐 @letsencrypt
0 notes
e-commerce-magento · 5 years
Text
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
Text
$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