cannot verify domain for API - api

I've created a TXT with the correct code on Cloudflare, where my domain is. When I come back to verify it, I select 'other', as Cloudflare is not listed and it continues to not verify.
I've tried doing a TXT with an automatic TTL and 2 minutes.
Verification failed for www.elementroc.com using the DNS TXT record method (less than a minute ago). Your verification DNS TXT record was not found. You might need to wait a few minutes before Google sees your changes to the TXT records.

Looks like you want to verify subdomain www, but you have added the TXT record on the apex (naked domain) instead.
dig txt elementroc.com +short
"ca3-40990cad916b47a8b017bb011cbb17e7"
"google-site-verification=cffal5Q1lTU3_ATSfu1GGXd1b44nmyReUZOjPWXwEfw"
Google attempts to find the TXT record in www.elementroc.com but there's none.
dig txt www.elementroc.com +short
~
Refer to Cloudflare KB How do I verify a Google TXT record?.
If you want to verify your root domain, put # or elementroc.com for Name field of the record.
If you want to verify your subdomain www, put www.elementroc.com for Name field of the record.

Related

Split CSV file in records and save as a csv file format - Apache NIFI

What I want to do is the following...
I want to divide the input file into registers, convert each record into a
file and leave all the files in a directory.
My .csv file has the following structure:
ERP,J,JACKSON,8388 SOUTH CALIFORNIA ST.,TUCSON,AZ,85708,267-3352,,ALLENTON,MI,48002,810,710-0470,369-98-6555,462-11-4610,1953-05-00,F,
ERP,FRANK,DIETSCH,5064 E METAIRIE AVE.,BRANDSVILLA,MO,65687,252-5592,1176 E THAYER ST.,COLUMBIA,MO,65215,557,291-9571,217-38-5525,129-10-0407,1/13/35,M,
As you can see it doesn't have Header row.
Here is my flow.
My problem is that when the Split Proccessor divides my csv into flows with 400 lines, it isn't save in my output directory.
It's first time using NIFI, sorry.
Make sure your RecordReader controller service is configured correctly(delimiter..etc) to read the incoming flowfile.
Records per split value as 1
You need to use UpdateAttribute processor before PutFile processor to change the filename to unique value (like UUID) unless if you are configured PutFile processor Conflict Resolution strategy as Ignore
The reason behind changing filename is SplitRecord processor is going to have same filename for all the splitted flowfiles.
Flow:
I tried your case and flow worked as expected, Use this template for your reference and upload to your NiFi instance, Make changes as per your requirements.

Exim Verify Reciepient by existence of a file

I want to configure Exim to verify and accept emails only for users where a File exists. The File itself lies in a Folder constructed by paths of the Filename. (for use with modified mailman):
the mail for "mailing_address.tld#domain.tld" should only be accepted if a file exists:
/var/lib/mailman/a/ad/domain.tld/mailing/config.pck
So
/var/lib/mailman/{first letter of address "**a**"}/{first and second letter of address "**ad**"}/{first part of local_part delimtered by _ "**mailing**"}/config.pck
I've tried with exim sg and substring but I couldn't get it to work.
I found a solution with sg and substr:
MM_NAME=${sg{$local_part}{_.*}{}}
MM_DOMAIN=${sg{lc::$local_part}{.*_}{}}
MM_LISTCHK=/var/lib/mailman/lists/${substr{0}{1}{MM_DOMAIN}}/${substr{0}{2}{MM_DOMAIN}}/MM_DOMAIN/MM_NAME/config.pck
it's 3 parts but works like intended

php upload image, what if uploaded file contains virus

I'm asking what if the uploaded file form an html form contains a virus...
If the server has a good antivirus, what would it do ? would it automatically prevent the file from being uploaded? or I should do some coding to be sure it's a healthy file?
If it's being uploaded onto the database.. not 100% sure. I don't think it would be detected. The database have to be scanned by the AV. Most AV exclude DB for performance. If it's stored on the filesystem directly, it may quarantine
So take the file, create a php function to generate a Sha256 Hash of the file itself and have the file scanned using the VirusTotal API. If it is/has a virus from any vendor, you can purge the file. If you need a special whitelist, then create a whitelist and create your own custom table for whitelisting files with a SHA256 hash.
So once a user's file is uploaded, just leave a notice that it's being checked by moderators. Then have a cron job/sch task that checks on hash results every 30 minutes. Have a few extra fields in your UserUploads table for the FileHash, and a Safe/Virus Field. You want to have those 2 fields separate or simply use 0, 1, 2 in the Safe field to consolidate the Virus/Safe field. So the user's file starts at 0... If its scanned and safe, it gets a 1, if its confirmed for a virus it gets a 2. You can send off an email to the user saying, This file is infected and allow them to send a reply for 72+ hours or so. If it's just a false positive, you can whitelist the hash yourself by updating the field to 1. You can reduce your efforts by scanning your own database first to see if other users are uploading the same files, automatically whitelist them if they exist in your DB & their Safe field is set to 1.
Suggestive table:
FileUploadHash UserID Safe Virus FileName Blobdata
-------------- ------- ---- ----- ---------- ---------
SHA256 Hash ###### 0 1 xyajss.pdf {bin vomit}
SHA256 Hash ###### 1 0 2021jf.png {bin vomit}
So do your loop thru these results and purge where virus = 1. Purge the file and send an email to the user that their file was deemed unsafe and was administratively removed.... Apologies...inconvenience.. blah blah. Then you can allow the users to access based on the "Safe" field. So if the file is safe... do xyz load to make the file content available on your site.
Here's the reference for the VirusTotal Api. They literally have code for dozens of coding languages and implementations.
https://www.virustotal.com/en/documentation/public-api/

Apache access log for IP address

How do I output the entire access log for a specific IP address only (from access.log)?
In other words, an access log that only contains details from a specific IP address.
If you are familiar with unix command line tools then you can also try grep or awk. Here's how you can use grep. Replace the IP with the one you are looking for and access.log with the full path to that file on your system.
grep 123.345.678.129 access.log
Hope that helps!
Copy the file and paste it on desktop or any other directory.
no open new excel file.
In excel, Go to Data From file, select all files type, open the file and import.
Select fixed width in original data type and finish.
select the first column and click on data ->filter
now select you can select data with ip now.

Mod-Rewrite to variable ending file

I'm trying to get apache to serve any request for /uploaded/2 with the first file that starts with 2 in a certain directory (say /foo/bar/).
Basically, If I have directory /foo/bar with contents:
1-filenameclutter.wav
2-clutterinthefilename.mp3
3-someweirdtext.jpg
And a web browser makes a request for /uploaded/1, apache would return 1-filenameclutter.wav; a request for /uploaded/2 would return 2-clutterinthefilename.mp3; etc. (all files with the right mime-type).
As far as I can see, ModRewrite can only go from a source with extraneous data to a simplified file on the file system, not the other way around.
Do you guys know any way to do this, with ModRewrite or using apache in another way (no PHP)?
EDIT:
Two things to point out, 1) I'm not concerned with duplicate files starting with the same id. These files correspond to an object in a database, which has a primarykey, id. 2) The reason I'm doing this is because I won't know exactly what the extension of the file is, but I do know the id, so when I form these I just prepend the orignal filename to the end of {{id}}- (Don't worry, I replace all ".."'s with "~").
Mod-rewrite has the ability to check if a single specific file exists, but you can't search a directory for a file pattern. Note that what you are suggesting would have horrible scaling attributes because the system would have to search all the files to find the file you are looking for. Since you already have the file in the database, why don't you just name the file with the id and keep the real filename in the database? In that case, /uploaded/2 would return the file at that location. You don't even need mod_rewrite.