avatarClive Wilson

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

2236

Abstract

was an issue remaining. The document used dark theme and the content in the external page used white background.</p><p id="0afe"><b>Hack 2: </b>Use dark-reader to automatically generate css for your external page</p><p id="f222">You can use <a href="https://darkreader.org/">dark-reader</a> to automatically apply dark style to your page. There are two options. First is to use dark-reader in your project via npm and apply dark theme automatically. For my case, this was a bit overkill and I choose the second option. Second option is to generate and export css file corresponding to dark theme of your external page and then adding that style-sheet to our <code>iframe</code>.</p><p id="df41">First install the <a href="https://darkreader.org/">dark-reader</a> add-on/extension to your browser. I have done it on Firefox. Then open your external page in that browser and enable the dark-mode in dark-reader add-on.</p><figure id="54a0"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*akq4Mmrutw6XTVdZMY9VBQ.png"><figcaption>dark-reader add-on in Mozilla Firefox</figcaption></figure><p id="ded5">When you enable dark-mode, the dark-reader has generated and applied appropriate styling to make your page dark-themed. It works great. You can also tweak around and set brightness, and contrast as well as use developer tools to further customize the design. Once you are happy with the design, click on the dark-reader browser-action button to open the popup menu and click on settings.</p><figure id="af34"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*B_-rTeDGalYJ-Ci6nyyapg.png"><figcaption></figcaption></figure><p id="0ea2">This will open up the settings view as displayed below.</p><figure id="bac9"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*dqdeQaWkTj38obrpRLEoVg.png"><figcaption></figcaption></figure><p id="1b63">Click on Manage settings and then on <b>Export Dynamic Theme</b>.</p><figure id="504a"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*eoK7sNZcYxZF-xWQ3NjEIg.png"><figcaption></figcaption></figure><p id="2bb4">Great job! This will download a css file that you can add to your page to apply the styles for dark theme. Hmmm… So far so g

Options

ood. I believe most of you would do the rest of the stuff on your own, but for the sake of completeness let us add a few lines of code to the event-listeners that we created in Hack1.</p><p id="2a64">Save the css file that was downloaded by the dark-reader as <code>dark-theme.css </code>in the <code>/public</code> directory of your Next.js app. Now, add following lines inside the <code>"load"</code> event-listener.</p><div id="d14f"><pre>const link <span class="hljs-operator">=</span> doc.createElement(<span class="hljs-string">"link"</span>)<span class="hljs-comment">;</span></pre></div><div id="e451"><pre><span class="hljs-attr">link.rel</span> = <span class="hljs-string">"stylesheet"</span><span class="hljs-comment">;</span></pre></div><div id="d811"><pre><span class="hljs-attr">link.href</span> = <span class="hljs-string">"/dark-theme.css"</span><span class="hljs-comment">;</span></pre></div><div id="214b"><pre>doc.head.appendChild(link)<span class="hljs-comment">;</span></pre></div><p id="caa5">Next time when you do this, you will be able to add existing HTML files to your project with custom themes in much lesser time than the time you spent reading this document.</p><p id="3a9a">Wish you all the best and happy coding!</p><p id="ad6f">Interested in building career in web development? Checkout E-degree in JS Frameworks</p><div id="2976" class="link-block"> <a href="https://www.eduonix.com/javascript-frameworks-mini-edegree/UHJvZHVjdC00NDExNjgw"> <div> <div> <h2>JavaScript Mini E-Degree: Master JS Frameworks To The Core!</h2> <div><h3>A perfect mini-e-degree suitable for everyone who wants to master JavaScript effectively without wasting any time…</h3></div> <div><p>www.eduonix.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*OBLf0FHe3Jrk8Lbg)"></div> </div> </div> </a> </div><p id="79c1">Or my course on <a href="https://www.udemy.com/course/react-and-next-js-with-typescript/?referralCode=7202184A1E57C3DCA8B2">React + Next.js with TypeScript</a>.</p></article></body>

ONLINE SCAMS

SCAM ALERT: Domain Name Renewals and Quarantined Messages Pending

Scammers will try every angle and every trick in the book

Image by Robinraj Premchand from Pixabay

As if we don’t have enough to occupy our minds with everything else that’s going on in the world, now we have another online scam.

That old domain name renewal scam routine

Domain renewal scams have been going on as long as domain names have been around. It’s simple. A scammer looks-up your domain name to find when it’s due for renewal (it’s public information). They send you a letter or email — some sort of official-looking notification that explains your entire online presence will disappear if you don’t renew the domain name right now. ‘Click here to pay.’

Maybe they’re not that direct, and they simply tell you your domain name is due to expire and that you need to renew it before a certain date. ‘Click here to pay.’

Image courtesy of the author

You, the unsuspecting, non-technical, trusting domain owner, assume it’s genuine and pay what they’re asking. Why wouldn’t you?

The net result? The domain (potentially) lapses because the registrar didn’t receive your renewal fees. So now you have lost your original fee, the scammer has your credit card payment details, and you may have to fight the registrar to get your domain back.

BE WARNED: The domain renewal scam is less-often seen now, mainly due to the GDPR (Europe) and the Privacy Shield Framework (US) restricting access to domain ownership details, but it’s still out there and it will be back in some form.

The new email release scam routine

If scammers can’t track you down as the owner of your domain name(s) to get you to part company with your money, there’s a new(ish), easier way.

Email addresses are stolen all the time. Like every day. Some say they steal hundreds of millions, some say it’s more like billions. The number is irrelevant. But when your email address is stolen because of a data breach, and then sold on the dark web, well now any number of ‘dark’ organisations might have it.

On March 9th, 2021, I received an email that included the following table:

Image courtesy of the author

This says there are four emails held in quarantine that I’m likely to want to be released. Specifically, the email message says: “You have 4 Quarantined emails in our server cloud storage.” Nothing else. No instructions, no threats, and no idea even who they are.

But I’m worried, right? The four emails are all financial transaction-based, so I’m definitely going to want those emails. Well, maybe.

All I have to do is click the handy ‘Deliver all messages’ link and they’ll be flying into my mailbox soon.

Hmm. Really?

Ok, so let’s click the link and see what happens.

Screen grab courtesy of the author

I’m asked to log in. To what, exactly? I mean, it looks like Microsoft with the four colour logo, but I’ve not seen one quite like that before.

Wait, look at the address bar:

Screen grab courtesy of the author

Oh, ok, that’s fine. It IS a Microsoft login page, and I have a Microsoft account. So far, so good.

But hang on. I don't use Microsoft for my emails.

In fact, if I look at the address bar again, well, it’s not actually the address bar at all. It’s part of the screen background that sits BELOW my address bar:

Screen grab courtesy of the author

Ok, ok, so maybe this is looking seriously suspect now. Maybe I shouldn't go any further. I mean, those emails can’t be real. Can they?

In fact, now I think about it, those emails held in quarantine are all business-type emails, but the email address is my [old] personal email address.

I’m seeing the bigger picture now, but what would happen if I continued and attempted to login?

First, they’d have my username and password for my Microsoft account, but whatever I put in will work anyway, as they need me to move on to the next stage. Second, they’re likely to ask me for money to release the imaginary emails. It is a service they’re providing. Weird though, as I’ve never seen this before.

Oh, that right, because I manage my own hosted email account! Of course, silly me.

I think I’ll leave it right there.

Photo by Sigmund on Unsplash

Seriously. Just stop right there.

What to do if you receive something like this

Step one is to use your common sense. I cannot emphasise this enough. Common sense, gut feeling, call it what you will. If it doesn’t feel right from the second you open the email, then it’s not right.

Do you even recognise who the email came from? Did they send it to an email address you’re currently using, but can still receive? You know that feeling you get when your phone rings, but you’re 100% sure you want to answer because the caller’s number is withheld? It’s the same feeling. Don’t ignore it.

Step two: If you were trusting/gullible/stupid enough to open an email you’re already suspicious of, well, two things have happened.

First, you have a second chance to exercise your common sense. You don't recognise the sender; the content looks suspicious; you know your email is hosted/managed somewhere else/by someone else/by you, and there’s no company name, no signature, no contact details. So ignore it and delete it.

Second, you received the email; you opened it, so you’ve just confirmed you’re alive and kicking. Bingo. The value of your email address has shot up and you’ll probably be spammed to death in the coming weeks and months. Sorry about that, but it’s what they rely on.

NOTE: I have subjected myself to what you see above in your best interests so that I could show you what happens when you click the link. You’re welcome.

I always say, with suspicious emails and phone calls, if I don’t read it/answer, and it’s that important, they’ll get back to me. They usually don’t.

Can you find out if your email address has been stolen in the past?

Absolutely. Most data breaches are public knowledge. The GDPR and the Privacy Sheild Framework put companies and organisations under serious pressure to own up to data breaches within a fixed time period. This way the public is aware and does something about it, like change account passwords, at the very least. Maybe delete the accounts entirely.

You can check if any of your email addresses have been stolen in the past by using the ‘pwned’ website. It’s not 100% foolproof, but it’s pretty damn good.

Brace yourself to be shocked. #sorrynotsorry

Go to: https://haveibeenpwned.com/

This is my pwned search for the email address they sent the scam to. It’s an old email address that I no longer use:

Screen grab courtesy of the author

See those six data breaches it mentions? Here are the details:

Screen grab courtesy of the author

Where I could, I changed login details or deleted the account. Covve and GeniusU remain a mystery as I do not know what they are and don’t recall signing-up for them.

In conclusion:

Your data is out there somewhere in the world, on dozens of different servers and probably clawing its way through the dark web as I write. It’s sad, it’s worrying, but it’s true, and it’s something we all have to get used to.

Don’t make it easier for the scammers by handing them your details — especially financial details — on a plate.

Change passwords regularly. Better still, use a password manager like LastPass or 1Password.

Finally, never, ever, ever, login to anything you don’t own, know or trust 100%

About the author: Clive Wilson

Scam
Business
Online
Cybersecurity
Cybercrime
Recommended from ReadMedium