• Stars
    star
    218
  • Rank 175,378 (Top 4 %)
  • Language
    C
  • License
    MIT License
  • Created over 4 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A proof-of-concept Slack client for Windows for Workgroups 3.11 with tests.

icon w31slack

A proof-of-concept Slack client for Windows for Workgroups (WFW) 3.11 with tests. As there are no native HTTPS APIs for the ancient version of Winsock on WFW, a HTTP-to-HTTPS proxy like this one I've written is needed.

Screen

Screenshot of the app

Alt text

Video of the app in action with a modern Mac Slack client on the side for verification.

Development and compilation setup

To compile and run the application, you'll need Visual C++ (VC++) 1.52 running on a 32-bit Windows OS up to Windows 10. Windows 3.1 is not required. I use a Windows 2000 VM as it is the oldest and lightest 32-bit Windows OS with full Virtualbox support.

Screen

Coding the app can thus be done on a native Mac or Windows OS with modern text editors.

Even though a 16-bit app can run on modern 32-bit OS, I still recommend occasional testing on a native Windows 3.1 system as VMs can be too perfect sometimes.

  1. Install Windows 2000 VM on a host PC. If you want to share files out of the Win 2K VM, set the network to Bridged.
  2. Install VC++ 1.52
  3. Set up Virtualbox shared folder between the host and Win 2K WM
  4. Map a network drive to the local shared folder
  5. VC++ 1.52 can see a network drive and open the w31slack.mak
  6. Just click Project -> Rebuild all.

Screen

The w16slack.exe binary should be available in the same directory.

Executing the unit tests

I wrote a custom unit test framework as I could not find a testing framework for C89 that'll work with VC++ 1.52. 2 Go Programs acting as mock servers are required to be run to test the network APIs.

Screen

  1. go run mockprox.go will reply the GET and POST requests by replaying the contents of the ou*.txt files.
  2. go run replay.go 30000 will replay whatever was received on a pure TCP socket connection.
  3. Edit the file tstconst.h to suit your system especially the TEST_MOCK_SERVER_IP
  4. Open the file test.mak
  5. Build Project as per normal and run the binary in debug mode. You'll see the following

Running the app

  1. Make sure to grab the binary and sample config files from the release directory.
  2. First create an app for your associated workspace.
  3. Add these permissions to your app channels:history, channels:read, chat:write:user, groups:history, identify, im:history, users:read.
  4. Go to "OAuth & Permissions" section and get your OAuth Access Token. The URL should be https://api.slack.com/apps/XXXappIDXXX/oauth?
  5. Start up http-to-https-proxy
  6. Modify the file w31slack.ini configuration file to suit your needs. Fields in this order, token, server polling rate in milliseconds, IP address of proxy, port of proxy, number of messages to get to display.
  7. Start up the w31slack.exe. The binary and example config file is in the release folder.
  8. Profit!

Workaround to large numbers of users and channels

The app may fail if the number of users and channels in the workspace are huge. That results in too large a Json reply. To mitigate this, you can provide a file containing the id and channel/user combination for manual loading into app.

  1. Create the file userchan.ids in the same directory as the binary.
  2. Fill in line by line in this format channelID channelname
  3. Users are also filled in the same file and format userID username

Take a look at the sample file sample-userchan.ids.

To get the IDs, you can use these curl commands to get the Json and manually populate the file.

curl -H "Authorization: Bearer xoxp-821448956678-818775000324-818797461140-4d175b4e14b948d630f195e51478bb0e" -X GET "https://slack.com/api/conversations.list"

curl -H "Authorization: Bearer xoxp-821448956678-818775000324-818797461140-4d175b4e14b948d630f195e51478bb0e" -X GET "https://slack.com/api/users.list"

References

  1. Building Win16 GUI Applications in C
  2. Win16 Example Application

More Repositories

1

docs-to-pdf-converter

A standalone Java library/command line tool that converts DOC, DOCX, PPT, PPTX and ODT documents to PDF files.
Java
579
star
2

doschgpt

A proof-of-concept ChatGPT and Hugging Face client for DOS with text-to-speech for Sound Blaster compatible systems.
C++
186
star
3

SwiftSerial

A Swift Linux and Mac library for reading and writing to serial ports.
Swift
136
star
4

http-to-https-proxy

A proxy that upgrades HTTP connections to HTTPS for systems which cannot make HTTPS requests.
Go
74
star
5

gentoo-on-486

Instructions on how to install modern Gentoo Linux on ancient 486-based PCs.
66
star
6

programming-win31

The sample codes provided in the floppy disk of Charles Petzold's book Programming Windows 3.1.
C
43
star
7

ndp2019-wristband-teardown

Tear-down effort of the Pixmob wristband used in NDP2019.
43
star
8

reverse-engineering-ndp2016-wristband

Schematics of the reverse engineered Pixmob wristband used in NDP2016. Sample IR brute-force code is available but has not been fully tested in practice.
KiCad Layout
24
star
9

retro-configs

Collection of my DOS configurations and drivers of my retro machines
Assembly
22
star
10

covox-music-player

A Linux program that plays MP3 or WAV files to the Covox Speech Thing or its clones via a native parallel port.
C
18
star
11

nus-soc-print

An Android application that prints office documents and PDF files to Unix printers in NUS School Of Computing via SSH
Java
16
star
12

pcb-covox-amp

A tiny sound card based on the Covox Speech Thing design which includes an LM386 amplifier.
16
star
13

reflections-on-trusting-trust

A talk (including sample code) about the Turing award lecture "Reflections on Trusting Trust" originally given by Ken Thompson.
C
15
star
14

distance-machine-locker

A system that locks your computer the moment you move away from it.
Swift
14
star
15

coders-dvorak-regular-keypad

Programmer Dvorak layout with the typical keypad layout instead of the modified one by Roland Kaufmann.
14
star
16

ssim

Program to measure the similarity between two videos using the OpenCV library and the structural similarity algorithm (SSIM). This is modified from the video-input-psnr-ssim tutorial of OpenCV.
C++
13
star
17

intro-to-ble

A talk about basic Bluetooth Low Energy concepts followed by code explanations.
Java
11
star
18

ne2000plus-collection

Collection of NE2000+ software obtained from various sources
Assembly
10
star
19

pcb-covox

A tiny sound card based on the Covox Speech Thing design.
9
star
20

pi-radio

Raspberry Pi internet radio streamer for Singapore. Can be modified to stream other internet radio stations.
Python
9
star
21

nus-soc-print-ios

An iOS Application that prints office documents and PDF files to Unix printers in NUS School Of Computing.
Swift
9
star
22

ble-localiser

This talk is about how I manage to do localisation using 3 Raspberry Pis(RPis) as beacons.
Swift
7
star
23

ssim-cuda

CUDA Program to measure the similarity between two videos using the OpenCV library and the structural similarity algorithm (SSIM). This is modified from the video-input-psnr-ssim tutorial of OpenCV
C++
6
star
24

iot-esp32-mcu-workshop

This is an introductory IoT ESP32 Microcontroller workshop to get acquainted with microcontroller programming and simple electronics.
C++
6
star
25

dvfs

A C++ native Android program that does dynamic frequency scaling to achieve a target frames-per-second (FPS).
C++
5
star
26

reflections-on-trusting-trust-go

A talk (including sample Golang code) about the Turing award lecture "Reflections on Trusting Trust" originally given by Ken Thompson.
Go
5
star
27

SwiftLinuxSerial

A Swift 3 Linux-only library for reading and writing to serial ports. (Deprecated for SwiftSerial)
Swift
4
star
28

ht107e-socket-tester-teardown

3
star
29

pcb-name-card

My business card that is on a Printed Circuit Board (PCB). Comes with an white LED, UV LED, ruler and QR code.
Eagle
3
star
30

intro-to-pcb-design-eagle

A class to introduce students to designing Printed Circuit Boards (PCBs) using the Eagle software.
Eagle
3
star
31

odroid-power-measure

A Java program that dynamically shows FPS, CPU/GPU frequency and power of Odroid-XU.
Java
2
star
32

mov-is-turing-complete

A talk about the academic paper "mov is Turing-complete" written by Stephan Dolan". Practical examples from movcc compiler by Chris Domas.
C
2
star
33

pcb-usb-ft245r-parallel-adapter

A USB to parallel adapter using the FTDI FT245R chip. This is not a IEEE 1284 compliant parallel port. Just using the DB25 connector to access the data pins.
KiCad Layout
2
star
34

intro-to-rpi

A short introductory course I conducted for people new to Raspberry Pis and Linux.
Python
2
star
35

pcb-breakout-ltc3625-tps63031

Pin breakout of the LTC3625 supercapacitor charger with TPS63031 3.3V regulator to through-hole pin headers for prototyping
2
star
36

pcb-covox-amp-v2

A tiny sound card based on the Covox Speech Thing design which includes an LM386 amplifier and FT245RL chip to receive data via USB. This project is a combination of my 2 earlier projects pcb-covox-amp and pcb-usb-ft245r-parallel-adapter
KiCad Layout
2
star
37

vibrate_alarm_clock_2

An vibrating alarm clock based on Microview.
Arduino
1
star
38

start-sslstrip-on-boot

Scripts to to start SSLStrip on boot for Arch Linux ARM on Raspberry Pi
Shell
1
star
39

yeokm1.github.io

Hugo compiled frontend files for my site at http://yeokhengmeng.com.
HTML
1
star
40

power_measure_tool

An Arduino setup to measure the voltage and current of a load.
C++
1
star
41

retro-configs-apple

Collection of my setup configurations and disc locations of my retro Apple machines
1
star
42

cs5272-project

A group project done in NUS CS5272 module in AY2014-2015 Sem 2.
C
1
star
43

yeokm1.github.io-hugo

Hugo source files for my site at http://yeokhengmeng.com.
JavaScript
1
star
44

pcb-bme280-breakout

Pin breakout of the Bosch BME280 sensor to through-hole pin headers for prototyping
Eagle
1
star
45

dvfsapp

An app front end that does dynamic frequency scaling to achieve a target frames-per-second (FPS).
Java
1
star
46

vibrate_alarm_clock

An alarm clock with vibration capabilities.
Arduino
1
star
47

getting-started-with-rpi

A talk about introducing the audience to setting up the Raspberry Pi as well as basic Python coding on the GPIO pins.
Python
1
star
48

auto-rotate-screen

A program that auto rotates the screen when the Thinkpad is rotated.
C++
1
star