home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   sci.physics.relativity      The theory of relativity      225,861 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 225,204 of 225,861   
   The Starmaker to starmaker@ix.netcom.com   
   Re: Everything You Wanted To Know About    
   22 Dec 25 23:05:07   
   
   XPost: sci.physics   
   From: starmaker@ix.netcom.com   
      
   I'm curently working on a UDP, implementeing proper article   
   cancellation logic, by teaching Ai to learn How To   
   perform actual cancellations by bypassings  NNTP server permissions.   
   GODMODE! You will only be able to  post on Usenet if... 'I ALLOW it'.   
      
      
   import nntplib   
   import tkinter as tk   
   from nntplib import NNTP   
   from time import strftime, time, localtime   
      
   class CancelArticlesApp(tk.Tk):   
       def __init__(self, *args, **kwargs):   
           super().__init__(*args, **kwargs)   
      
           # Initialize the message_id variable   
           self.message_id = ""   
      
           # Create the UI elements   
           self.server_label = tk.Label(self, text='NNTP Server:')   
           self.server_entry = tk.Entry(self)   
           self.username_label = tk.Label(self, text='Username:')   
           self.username_entry = tk.Entry(self)   
           self.password_label = tk.Label(self, text='Password:')   
           self.password_entry = tk.Entry(self, show='*')   
           self.newsgroup_label = tk.Label(self, text='Newsgroup:')   
           self.newsgroup_entry = tk.Entry(self)   
           self.message_id_label = tk.Label(self, text='Message ID:')   
           self.message_id_entry = tk.Entry(self)  # Changed from   
   self.message_id to self.message_id_entry   
           self.cancel_button = tk.Button(self, text='Cancel Articles',   
   command=self.cancel_articles)   
      
           # Place the UI elements on the window   
           self.server_label.grid(row=0, column=0, sticky='W')   
           self.server_entry.grid(row=0, column=1, sticky='W')   
           self.username_label.grid(row=1, column=0, sticky='W')   
           self.username_entry.grid(row=1, column=1, sticky='W')   
           self.password_label.grid(row=2, column=0, sticky='W')   
           self.password_entry.grid(row=2, column=1, sticky='W')   
           self.newsgroup_label.grid(row=3, column=0, sticky='W')   
           self.newsgroup_entry.grid(row=3, column=1, sticky='W')   
           self.message_id_label.grid(row=4, column=0, sticky='W')   
           self.message_id_entry.grid(row=4, column=1, sticky='W')   
           self.cancel_button.grid(row=5, column=0, columnspan=2, pady=5)   
      
       def cancel_articles(self):   
           try:   
               # Connect to the NNTP server   
               server = NNTP(self.server_entry.get())   
      
               # Authenticate if username and password are provided   
               username = self.username_entry.get()   
               password = self.password_entry.get()   
               if username and password:   
                   server.login(username, password)   
      
               # Select the newsgroup   
               resp, count, first, last, name =   
   server.group(self.newsgroup_entry.get())   
      
               # Get the message ID from entry   
               message_id = self.message_id_entry.get()   
      
               if message_id:   
                   # If specific message ID is provided, cancel that   
   article   
                   try:   
                       # Get article info   
                       resp, info = server.stat(message_id)   
                       # Post cancellation message (Note: actual   
   cancellation requires proper authorization)   
                       server.post(f"cancel   
   {message_id}".encode('utf-8'))   
                       print(f"Attempted to cancel article:   
   {message_id}")   
                   except nntplib.NNTPTemporaryError as e:   
                       print(f"Error cancelling article: {e}")   
               else:   
                   # If no specific message ID, loop through articles   
                   for article_id in range(max(first, last-10), last +   
   1):  # Limiting to last 10 articles for safety   
                       try:   
                           resp, info = server.stat(article_id)   
                           message_id = info.message_id   
                           server.post(f"cancel   
   {message_id}".encode('utf-8'))   
                           print(f"Attempted to cancel article:   
   {message_id}")   
                       except nntplib.NNTPTemporaryError as e:   
                           print(f"Error cancelling article {article_id}:   
   {e}")   
      
               # Close the connection   
               server.quit()   
      
           except nntplib.NNTPError as e:   
               print(f"NNTP Error: {e}")   
           except Exception as e:   
               print(f"Error: {e}")   
      
   if __name__ == '__main__':   
       # Initial NNTP test code   
       day = 24 * 60 * 60   
       window = 7   
       yesterday = localtime(time() - window * day)   
       date = strftime('%y%m%d', yesterday)   
       time_str = strftime('%H%M%S', yesterday)   
      
       # Test connection   
       servername = 'nntp.aioe.org'   
       groupname = 'alt.test'   
      
       try:   
           s = NNTP(servername)   
           resp, count, first, last, name = s.group(groupname)   
      
           resp, overviews = s.over((last-1, last))   
           for num, over in overviews:   
               sj = over.get('subject')   
               dt = over.get('date')   
               print(f"Date: {dt}")   
               print(f"Subject: {sj}")   
               print('-' * (len(sj) if sj else 0))   
      
           s.quit()   
       except nntplib.NNTPError as e:   
           print(f"Test connection error: {e}")   
      
       # Start the GUI   
       app = CancelArticlesApp()   
       app.mainloop()   
      
      
      
   On Sun, 21 Dec 2025 11:11:36 -0800, The Starmaker   
    wrote:   
      
   >Everything You Wanted To Know About Cross-Posting But Were Afraid To   
   >Ask   
   >   
   >Sometimes, you'll have an issue you think should be discussed in more   
   >than one newsgroup. Rather than posting individual messages in each   
   >group, you can post the same message in several groups at once,   
   >through   
   >a process known as cross-posting.   
   >   
   >Say you want to start a discussion about the political ramifications   
   >of   
   >importing rare tropical fish from Brazil. People who read rec.aquaria   
   >might have something to say. So might people who read   
   >alt.politics.animals and talk.politics.misc.   
   >   
   >Cross-posting is easy. It also should mean that people on other   
   >systems   
   >who subscribe to several newsgroups will see your message only once,   
   >rather than several times -- news-reading software can cancel out the   
   >other copies once a person has read the message. When you get ready to   
   >post a message , you'll be asked in which newsgroups. Type the names   
   >of   
   >the various groups, separated by a comma, but no space, for example:   
   >   
   >rec.aquaria,alt.politics.animals,talk.politics.misc   
   >   
   >and hit enter. The message will be posted in the various groups   
   >(unless   
   >one of the groups is moderated, in which case the message goes to the   
   >moderator, who decides whether to make it public).   
   >   
   >It's considered bad form to post to an excessive number of newsgroups,   
   >or inappropriate newsgroups. Probably, you don't really have to post   
   >something in 20 different places. And while you may think your   
      
   [continued in next message]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca