Skip to content

Commit

Permalink
Merge pull request #2 from ThomasByr/v1
Browse files Browse the repository at this point in the history
v1 release 2
  • Loading branch information
ThomasByr committed Nov 27, 2023
2 parents 65ed23c + 5202a72 commit 5a294fe
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 8 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

<summary>The full history, or so was I told...</summary>
versions next to titles correspond to the first version that introduced either the release or the minor

## alpha

Expand Down Expand Up @@ -52,3 +53,11 @@
**v1.0** release (1.0.1)

- config file checkers
- tests for generators
- generators now skip empty or blank lines in .txt files and do no longer lowercase everything
- fixed consecutive failure logic and logging
- changed emotes ... because

**v1.1** (1.1.0)

- removed `no-tor` suggestion
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,14 @@ Please read the [changelog](changelog.md) file for the full history !
**v1.0** release (1.0.1)

- config file checkers
- tests for generators
- generators now skip empty or blank lines in .txt files and do no longer lowercase everything
- fixed consecutive failure logic and logging
- changed emotes ... because

**v1.1** (1.1.0)

- removed `no-tor` suggestion

</details>

Expand All @@ -229,7 +237,6 @@ Please read the [changelog](changelog.md) file for the full history !
**TODO** (first implementation version)

- [x] add a simple cli (0.1.1)
- [ ] option to not use tor (?)
- [x] option to change Tor ID each X requests (would need to implement a catch-up mechanism because thread jobs are unordered) (v1.0.0-dev)
- [ ] option to use a running tor instance/service
- [ ] choose protocol (http, https, ssh, etc.) (opened http and https in 1.0.1-rc1)
Expand All @@ -238,7 +245,7 @@ Please read the [changelog](changelog.md) file for the full history !
**Known Bugs** (latest fix)

- [ ] lagging threads are not catching up, especially when `ReadTimeout` is reached (interferes with Tor ID swap)
- [ ] sometimes, successfull logins are not reported, or are reported twice (might be fixed with separate sessions for each thread)
- [x] sometimes, successfull logins are not reported, or are reported twice (v1.0.1)

## 🎨 Logo and Icons

Expand Down
8 changes: 5 additions & 3 deletions src/core/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,17 @@ def post_search(self, pport: int, username: str, password: str) -> bool:
else:
if not response or response.status_code != 200:
self.logger.error(
"failed multiple reconnect to target [%s]:[%s] : %s ❌",
"failed multiple reconnect to target [%s]:[%s] : %s (%d/%d) ❌",
username,
password,
last_exception,
self.consecutive_fails + 1,
self.max_tries,
)
with self.lock:
self.consecutive_fails += 1
if self.consecutive_fails >= self.max_tries:
self.logger.critical("too many consecutive fails, exiting ... ❌")
self.consecutive_fails += 1

if response and self.target.search(response.text):
self.logger.info("Login successful using [%s]:[%s] 🎉", username, password)
Expand Down Expand Up @@ -176,7 +178,7 @@ def run(self):
length = len(self.bar_title(0, digits, user.count))

self.logger.info("Starting App 🚀")
self.logger.info("Got %d users and %d passwords 🫧", user.count, passwd.count)
self.logger.info("Got %d users and %d passwords ⚙️", user.count, passwd.count)

def on_each():
"""setup session and bar title"""
Expand Down
2 changes: 1 addition & 1 deletion src/helper/fmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def formatter(


class UsefulFormatter(logging.Formatter):
name_width = 4
name_width = 10
dt_fmt = "%Y-%m-%d %H:%M:%S"

def __init__(self, *args: Any, colored_output: bool = True, **kwargs: Any) -> None:
Expand Down
3 changes: 2 additions & 1 deletion src/onion/tor.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,10 @@ def ip(self) -> str:
if not response or response.status_code != 200:
self.logger.error(
"failed multiple reconnect to httpbin.org (%d/%d) ❌",
self.__consecutive_fails,
self.__consecutive_fails + 1,
self.max_tries,
)
self.__consecutive_fails += 1
if self.__consecutive_fails >= self.max_tries:
self.logger.critical("too many consecutive fails, exiting ... ❌")
return None
Expand Down
2 changes: 1 addition & 1 deletion src/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
# 'development' version, labeled 'dev'.

# Example, '0.4.0-dev'
__version__ = "1.0.1"
__version__ = "1.0.2"

0 comments on commit 5a294fe

Please sign in to comment.