feat: add email module for Alza - #492
Conversation
|
@kaifcodec Thoughts on this? When I added the two regional versions of Yaga, I created separate modules for each. Here, with five sites, this would get a bit spammy... |
| return Result.taken(url=main_url, extra={"has_account": True}) | ||
| case 2: | ||
| # Orders with this email were created, but the email does not belong to any account | ||
| return Result.taken(url=main_url, extra={"has_account": False}) |
There was a problem hiding this comment.
This case will definitely become confusing for users without reading source code - the module will report the email as "registered", but simultaneously says an account does not exist. I'm not even sure how to express these results better... I definitely wouldn't exclude this case, since even "has made an order" is useful information.
There was a problem hiding this comment.
-
You don't need to pass the
extradictionary for case 1. ReturningResult.taken(...)already conveys thathas_account=True, so including it inextrais redundant. -
For case 2, you can use the
reasonparameter instead. All three result types (.taken(),.error(), and.available()) support it, so you can do something like:
return Result.taken(
url=main_url,
reason="This email is not registered, but it has been used to place an order.",
extra={"has_account": False},
)@kristoisberg
I think this better represents the OSINT value of the result. Even if the email isn't registered, it has still interacted with the site, so returning Result.taken(...) is reasonable. The reason explains why it's considered a hit, while extra provides the additional context that the email doesn't actually have an account.
@kristoisberg Good catch. They most likely use separate databases for each regional site rather than treating all five domains as a single service. So @beranka, I think it's better to open another PR where you split these into five separate modules. It will be more scalable and also more user-friendly, since users can immediately identify the region from the results instead of only getting to know that the email is registered on "Alza". The filenames could be something like:
|
|
@beranka Would you like to take more time working on this PR, or should I label it as |
I am just busy with work this week, but I will take a look at it on Sunday. |
|
That's great. Thank you for the clarification. |
@kaifcodec Why another PR? Also what should I do to avoid repeating the same code for each variant? Could I maybe create |
|
Adds an email scan module for Alza.
Alza has multiple websites for different countries in Central Europe; this checks all of them in a loop.
How it works
For each website:
LoginAvailabilityTypefield, set to:1(account associated with the email),2(email used for an order without an account),0(email not found),Then returns a
Resultwith status:availableif all websites returnedLoginAvailabilityType: 0.takenif at least one website returnedLoginAvailabilityType: 1orLoginAvailabilityType: 2; also returns two comma-separated lists:errorif an error occurred while checking any of the websites.Testing
Manually tested (and got expected results) with:
It's a little bit more complex than I expected (sorry), but I think it makes sense to check each of the regional websites 🙂