• XSS.stack #1 – первый литературный журнал от юзеров форума

чекер Pulse Secure / Ivanti SSL VPN [ip;login;passw]

Nope, __exit__() method close file automatically.
1736238044883.png

1736238208386.png


I'm talking about when the file variable goes out of scope (if using "with"), its automatically closed [1, 2].

You're either stupid or a python noob (maybe both). You picked up some smart practices, but you don’t understand what they are for. Go to sleep.
Why you don't debunk or explain what they are for then? I'm trying to "learn" there ))).


I will return the dislikes for your impudent and unfounded attack
You have the right to do that. But that looks you don't know at all and is just hating (from my point of view).
 
Пожалуйста, обратите внимание, что пользователь заблокирован
I'm talking about when the file variable goes out of scope (if using "with"), its automatically closed [1, 2].
First, you compare my closed descriptor when writing (from a few threads). Does this surprise you? Okay, I admit that when reading a file, you can save the iterator and load lines into threadpool line by line (this is bad idea anyway), but in the end, you will not close it. The descriptor will remain open in the system.
Why you don't debunk or explain what they are for then? I'm trying to "learn" there ))).
What should I explain to a smug fool? You butted in with your criticism of my code without even understanding the details of how it works. You write some nonsense with a serious face.
You have the right to do that. But that looks you don't know at all and is just hating (from my point of view).
I hate show-offs like you. Who actually read some Udemy course and think they're Python gurus. If you only meant type hints when you said I violated a PEP, you're a complete idiot. PEP8 requires conformance, and only as a recommendation, other PEPs are just specs, and type hints are just redundant code for one person. They don't really affect anything except readability and IDE performance. I wrote a simple little script (which is self-explanatory), not a library or framework where they can't be ignored.
And your example with a tuple [str, str, str] immediately makes it clear that you're an idiot. In fact, you should have created a struct or type, and validated the input string in it. And specified this class as a type in type hints
You shit yourself again
 
First, you compare my closed descriptor when writing (from a few threads).
I don't think i get it. Can you explain further? I think the language barrier is big there.
The descriptor will remain open in the system.
I don't think so; POSIX states that descriptors, directory streams, conversion descriptors, and message catalog descriptors opened by the process are closed when the process's lifecycle ends.

This POSIX behavior is implemented in linux at do_exit (at this line exactly), which calls exit_files that then calls put_files_struct, which cleans up every open file descriptor present in the file descriptor table. The do_exit() function is responsible for handling the cleanup and termination of a process, regardless of whether the process exits normally or is terminated by a signal.

The same (not the exact same, but similar) behavior occurs when a process lifecycle ends on windows (all private memory is freed, and all handles are closed, hence no file is left open).

I don't know how the XNU works internally, so i don't know the exact case on MacOS. But i'm sure that they implement similar techniques in their kernel since they are POSIX compliant.

Python, by itself, closes file automatically when `with` statement goes out of scope.

So, no. Both codes are correct and no file descriptor is leaked.

And your example with a tuple [str, str, str] immediately makes it clear that you're an idiot. In fact, you should have created a struct or type, and validated the input string in it. And specified this class as a type in type hints
You don't need a class just to specify that tuple. I wrote the code fast hence i didn't utilized type, you can just do:

Python:
type Bullshit = tuple[str, str, str]

and accept Bullshit as argument in functions.
 
Пожалуйста, обратите внимание, что пользователь заблокирован
Okay, I admit that when reading a file, you can save the iterator and load lines into threadpool line by line (this is bad idea anyway), but in the end, you will not close it. The descriptor will remain open in the system.
it's not critical, but if these are thread with a long-term task, your descriptors will accumulate and hit ulimit. With context manager you automatically avoid this
You don't need a class just to specify that tuple.
I wrote about the type and structure(dataclass) with validation fields, and in Python it's all "class"
after splitting, you should validate each part separately, IP, port, password (by good way). Oh, Fuck it! Because in your fucking tuple of strings you can pass anything, and your typing sucks
I'm tired of answering you obvious things, you're either a troll or a dumbass.
 
Последнее редактирование:


Напишите ответ...
  • Вставить:
Прикрепить файлы
Верх