Can anyone decrypt this string using PHP? [closed] - php

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Today I came across a job ad where you should decrypt a string that holds valid email address using PHP. So they posted this string, that represents crypted email address, and when you decrypt that email address you can send them email and show that you are Senior PHP developer.
And they posted another email address for Junior developers.
Now this seems to complicated for me so I wont send them email anyway since I already have a job, but I'm wondering is this even possible since you can't have key if using mcrypt functions.
Anyway, this is the string:
MDA3MTY4MDAwODg4MDE0NzIwMDAwMzg4MDAwNDQ0MDAwNTEyMDAwMzg4MDI1NjAwMDA3NDg4MDA3Mjk2MDAzNTUyMDAyOTQ0MDAwODMyMDAzNjQ4IzYzNzIyMzI4NjY1NjM1
Company name is Aduro, and their emails are xxx#aduro.hr, so we are looking for email that ends with #aduro.hr
That string represents valid email address, is anyone good enough to decrypt this?

Not an answer, but some observations:
MDA3MTY4
MDAwODg4
MDE0NzIw
MDAwMzg4
MDAwNDQ0
MDAwNTEy
MDAwMzg4
MDI1NjAw
MDA3NDg4
MDA3Mjk2
MDAzNTUy
MDAyOTQ0
MDAwODMy
MDAzNjQ4
IzYzNzIy
MzI4NjY1
NjM1
Every column containing a digit only contains digits and lowercase letters. Every column containing an upper case letter does not contain any digits.
If it is an e-mail address, then I would tentatively assign IzYzNzIy as the dot character '.' Nothing immediately strikes me as likely to be the '#', possibly the MDI1NjAw because it is the only one starting with MDI. The other non-MDA, MDE0NzIw, is in the correct position for a punctuation character in someone's name: "Smith-Jones" say. That would leave all the MDAs as alphabetic characters. What is happening after the potential dot is anyone's guess. Are there any single letter codes allowed there? NjM1 could be short for <CR><LF>.
Maybe we are looking at four character code elements?
MDA3
MTY4
MDAw
ODg4
MDE0
NzIw
etc.

Why are You thinking of mcrypt? It could be anything. Looks like a base64_encoded string.
Or something else. I think that they just don't want mails from 'senior' developers.

Related

what is the best from/email validation method in php? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I know there is a best method which called "PREG MATCH" in php programming language. I want to know is there any other method in php for validation? and which is the best? what method I practice as a pro php developer? Thank you all :)
As mentioned above in the comment, it's situational.
Most of PHP Frameworks have its own validation methods for e-mails and other types of data, yet these methods usually rely on regular expressions ("PREG MATCH") and do additional checks (if the domain has any DNS entry, etc.).
Also, PHP has built-in function filter_var() (http://php.net/manual/en/function.filter-var.php). It should return false if the provided string is not valid e-mail address, but unfortunately it is not always reliable.
You can always use Symfony Validator component without the framework: https://symfony.com/doc/current/validation.html
You cannot figure out if an email address is valid by looking at its format. If you try, you will make a mistake that makes it impossible for certain people to register even when using valid email addresses.
It's easy enough to look for addresses of the form something#example.com but what about something.something+else#foo.bar.baz.example.com? What about something#example.money or any newer top-level domain? For every example can list of an unusual address formats, there are a thousand I'm not even thinking of — and neither are you.
You can do a simple check like "does this contain an # in it somewhere?" if you want to quickly rule out someone typing their name instead of their email address, or basic "filled in the wrong box" sorts of errors, but don't try to nitpick whether the whole address looks valid.
If you actually need to know if the email address is valid there's one and only one way to do that: send email to it, and have the owner respond (e.g., by clicking a link)

Check spelling before making a query [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am writing a small program where I want to extract user input strings from MySQL database. But I am not looking for exact matching strings. For example
If user types amazon then it should extract amazon from the database. But if user types amazonn or amazo or amozon it should still retrive amazon because it is the nearest word to the misspelled word.
This is something similar to google suggestions while searching. Is there anyway to define a function like this in PHP? Do i have to import dictionary and compare with it?
You could use strpos() in two ways
How do I check if a string contains a specific word in PHP?
Search for the DB string in the string that the user inputted.
And the other way around:
Search for the string that the user inputted in the DB string.
The problem with this is that you only cover differences at the outside of the string
such as amazo or amazonn but not amozon
Or you could use levenshtein() and similar_text() as stated in the comments.
Good example code with suggestions:
https://codereview.stackexchange.com/questions/27173/php-spell-checker-with-suggestions-for-misspelled-words
That should be covered in an entirely different way...
I think you want both checks but everything is going to be difficult without a dicitonary so I suggest importing one ;)

Detect partial email pattern in PHP [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am writing an unsubscribe option of email newsletters.
I have to detect emails of following format:
<0 or more alphanumeric letter/digit only>, then one <#> character, then <1 or more alphanumeric letter/digit>, then a <.> character, then <at least 2 alphanumeric letter/digits>
I need "zero" or more alphanumeric character before # character and not "one" or more because sometimes I want to unsubscribe whole domain names, so in that case the pattern to match is #example.com, and I also want to detect full email, it starts with an alphanumeric character.
How can I write the code to detect?
I take the email from url as $_GET['email']
For example url will be:
http://www.example.com/php/unsubscribe.php?email=#example.com
http://www.example.com/php/unsubscribe.php?email=#example.co
http://www.example.com/php/unsubscribe.php?email=abc#example.co
well the Regex then simply reads
/#.+\.[^\.]{2,}$/
EDIT: I used .* and [^\.] even though the OP asked for "alphanumeric letter/digit" - however, valid E-Mail addresses include stuff like dashes, underscores etc... Completely matching ALL valid email adresses is incredibly complex! (see: http://www.regular-expressions.info/email.html)
You could use the below regex.
[A-Za-z0-9]*#[A-Za-z0-9]+\.[A-Za-z0-9]{2,}
DEMO
[A-Za-z0-9]{2,} matches two or more alphanumeric characters. You could specify the character range inside {} paranthesis.

PHP validating and filtering a list of international numbers so im left only with valid cellphone numbers from that country [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am building a tool that will validate and filter a list of numbers from csv/xlsx.
filter all non cellular.
validate that its indeed a cellular number from a chosen country (maybe dynamicaly).
tried google's libphonenumber but i realy didnt understand how to implement it.
please help with a basic regex so i can modify it with different country codes.
That problem is REALLY complex, and it is not always resolvable.
For example, while most (all?) European countries have separate prefixes for mobile numbers, that's not true in the NANPA region (US, Canada and others). Indeed, landlines and mobile numbers share the same geographical prefix, and there's absolutely no way to distinguish them.
Google's libphonenumber is actually great, and it contains the data for each country. For most countries it also includes methods to distinguish between mobile numbers and landlines, when it's possible (for NANPA, it always returns the "landline or mobile" constant). I've used that library for many projects, and it's really good (I've also contributed to it).
However, libphonenumber is officially available only for C/C++, Java and JavaScript, so you can't really execute it with PHP code. There's an UNOFFICIAL PHP port available, which seems also pretty updated, but I do not know how well it works. Docs and examples are available there too.
(Eventually, however, the biggest value in libphonenumber is in the data tables, the rest is just "companion code").
Well first of all you have to know all the number formats.....You could possibly use preg_matchto find like + in front of the number or () etc. Then I would explode first two numbers which most likely would be country code numbers.....then just do if statements that would look at these two numbers and based on what these numbers are decide what country is the number from.

Internet Explorer dropping the "v" in .gov email addresses in a PHP app [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
We've built an online event registration application built in PHP. We've discovered a bug in which email addresses entered into the system (for auto-email reply, self-retrieving one's registration, etc) and the email addy is a .gov email address, the "v" gets dropped, therefore all emails generated from the system do not get sent to the proper recipient. We've done testing and this appears to only occur when the registrant uses Internet Explorer.
We fixed the bug and here is what we found:
"It was javascript--client side
script. Every email address went
through a function called "trim()"
during the page data validation step.
Trim() was intended to strip
non-printing characters (spaces, tabs,
etc) that were leading or trailing the
address. The characters are identified
using a backslash notation: \t is tab
for example. There is another
non-printing character called a
Vertical Tab, which is (normally)
defined \v. But apparently a version
of IE released sometime in the last 15
months enterprets \v as "v" and it
stripped that character. The fix was
basically to gut my "trim()" function.
It now does nothing"
Though, we would like to know why IE's javascript engine stopped
interpreting \v as vertical space and started interpreting it as the
letter 'v'.

Categories