The Un-Official Proxomitron Forum
"Recovering" Proxomitron's Source Code... - Printable Version

+- The Un-Official Proxomitron Forum (https://www.prxbx.com/forums)
+-- Forum: Forum Related (/forumdisplay.php?fid=37)
+--- Forum: Proxomitron Program (/forumdisplay.php?fid=4)
+--- Thread: "Recovering" Proxomitron's Source Code... (/showthread.php?tid=2312)

Pages: 1 2 3


"Recovering" Proxomitron's Source Code... - amy - Jul. 26, 2017 07:28 AM

Given the progress me and others have made on fixing and extending the Proxomitron, presumably by disassembling and analysing it, I wonder if it would be interesting to anyone else here to go the whole hog and decompile it all, with the goal being to understand and create an identically functioning "rebuilt" Proxomitron using equivalent source code. The original source code is probably long gone (if anyone still cares enough to try getting it, they are more than welcome to...), but reverse-engineering technology has now advanced so much that an equivalent source can be created easily.

I know there are clones like Proxydomo, but they don't offer the exact functionality and unfortunately are a few times bigger and not quite as efficient... I've been reading through the Proxomitron code in small pieces at a time and it is really quite interesting. Scott was an extremely talented programmer and I think seeing that in source code form would be very enlightening. More pragmatically, we would be able to adapt and extend "New Proxomitron" in far more ways, and more easily, than any binary patches could do, all the while maintaining precise backwards-compatibility and that small, efficient core which other clones have not succeeded in doing.

"We have the technology. We can rebuild him... better, faster, stronger." Smile!


RE: "Recovering" Proxomitron's Source Code... - soccerfan - Jul. 28, 2017 12:13 PM

Go for it!!
I am speaking as just a noob end-user but my 2c.


RE: "Recovering" Proxomitron's Source Code... - zoltan - Jul. 28, 2017 10:12 PM

Another "noob end-user" here who is intrigued with this. I wonder what the possibilities are. Filtering HTTPS? An Android version? IPv6? I'd love to see the user base of Proxomitron expand so that we could all benefit from the creative input of people who really know how to construct useful filters. A lot of effort goes into ad-blockers, which is great, but there is so much more potential with a prog like this.


RE: "Recovering" Proxomitron's Source Code... - amy - Jul. 31, 2017 04:31 AM

@zoltan: HTTPS filtering is mostly working (I'm using it right now), but yes, all of what you mentioned would be possible. IPv6 would probably be easier than an Android version (I am not so familiar with that, I believe it would have to be translated to Java(!) first), plus there would be so much more we could do to extend Proxomitron --- HTTP/2, more interesting HTTPS/TLS/SSL stuff, etc. I've already found what I believe to be bugs that no one has noticed, and it would be great to fix those too.

There are approximately 631 functions, of which I have analysed 51 so far. (They vary from one-liners to >100 lines, so it's only a very rough indicator of progress.) I will continue posting progress updates here regularly. Smile!


RE: "Recovering" Proxomitron's Source Code... - Kye-U - Aug. 01, 2017 11:53 PM

@amy: awesome, do keep us updated!


RE: "Recovering" Proxomitron's Source Code... - amy - Aug. 06, 2017 09:37 PM

108 functions analysed now, or a little over 17% of them all. This is code mostly for configuration saving/loading, some blocklist stuff, and some of the UI. There is a lot of code but most of it is pretty mundane --- I haven't reached the "interesting" parts like the pattern matching engine and HTTP/network handling yet. From my initial investigation, those are somewhere in the middle.

As a rough estimate, I hope to finish this project before the end of the year.


RE: "Recovering" Proxomitron's Source Code... - prxymouse - Aug. 12, 2017 11:58 AM

Great news. I take it when you reach 100% you will be uploading the code to a public open source repo somewhere?


RE: "Recovering" Proxomitron's Source Code... - amy - Aug. 14, 2017 07:17 AM

Lots more UI and configuration code, external proxy handling, and the start of the filter testing dialog. It's starting to get more interesting now... 204 functions analysed, approaching 33%.

(Aug. 12, 2017 11:58 AM)prxymouse Wrote:  Great news. I take it when you reach 100% you will be uploading the code to a public open source repo somewhere?
I have not decided yet, but I will release the code somehow.


RE: "Recovering" Proxomitron's Source Code... - amy - Aug. 21, 2017 07:04 AM

Spent most of my available time since the previous update to analyse the function that preprocesses patterns into a more suitable form for the matching engine. I also found the "GIF freezer" function. Getting into the core of the program now, although I'm jumping around and not going through in sequence because some of the earlier functions don't make much sense if I don't know what calls them, and the callers are later. Also found what may be another bug, related to the + operator.


RE: "Recovering" Proxomitron's Source Code... - mizzmona - Aug. 22, 2017 11:52 PM

Yes, interested. Very.

Thanks!

(Jul. 26, 2017 07:28 AM)amy Wrote:  Given the progress me and others have made on fixing and extending the Proxomitron, presumably by disassembling and analysing it, I wonder if it would be interesting to anyone else here to go the whole hog and decompile it all, with the goal being to understand and create an identically functioning "rebuilt" Proxomitron using equivalent source code. The original source code is probably long gone (if anyone still cares enough to try getting it, they are more than welcome to...), but reverse-engineering technology has now advanced so much that an equivalent source can be created easily.

I know there are clones like Proxydomo, but they don't offer the exact functionality and unfortunately are a few times bigger and not quite as efficient... I've been reading through the Proxomitron code in small pieces at a time and it is really quite interesting. Scott was an extremely talented programmer and I think seeing that in source code form would be very enlightening. More pragmatically, we would be able to adapt and extend "New Proxomitron" in far more ways, and more easily, than any binary patches could do, all the while maintaining precise backwards-compatibility and that small, efficient core which other clones have not succeeded in doing.

"We have the technology. We can rebuild him... better, faster, stronger." Smile!



RE: "Recovering" Proxomitron's Source Code... - amy - Aug. 28, 2017 11:37 AM

Finished going through all the functions for parsing $-commands (all 35 of them, including the undocumented one...) The total code produced so far is currently a little over 6K lines of C. Not sure of the overall progress since I've been jumping around quite a bit, but it is probably around 40%.

@mizzmona, nice to see you here Smile!


RE: "Recovering" Proxomitron's Source Code... - amy - Nov. 17, 2017 12:30 PM

I took a little break because of other things but I'm still working on this... now re-inspecting some of the blocklist hashing code (it's very interesting) and renaming some functions to understand it a bit better. I'll continue with the rest of it too, still want to finish by the end of the year. I'm also generating documentation to help me with the understanding. That will eventually be released too, of course Smile!


RE: "Recovering" Proxomitron's Source Code... - amy - Dec. 04, 2017 11:47 AM

Time for another update:

Most of the code for the page filter dialog is understood now, along with some of the filter loading/saving. I see the code for serving local files (did you know Proxomitron has its own web-server? Very useful for hosting files to inject into pages) coming up, so I'm probably going to see the rest of the network stuff soon... that will be a refreshing change from all the UI stuff I was going through.

I'd estimate progress is currently at ~66%; not very certain, but definitely over 50%. Smile!


RE: "Recovering" Proxomitron's Source Code... - amy - Dec. 19, 2017 12:32 PM

Going through a lot of the network code now... yes, this is the part which will need to change for IPv6 support. I've found where the filtering/matching happens, but haven't really looked in detail at that yet. The end of the year is close, not sure I can finish by then, but I'll certainly try (and keep going even if I don't)!


RE: "Recovering" Proxomitron's Source Code... - soccerfan - Dec. 19, 2017 04:02 PM

(Dec. 19, 2017 12:32 PM)amy Wrote:  The end of the year is close, not sure I can finish by then, but I'll certainly try (and keep going even if I don't)!

And let us all hope to make it a happy new yearCheers