For those who don't know me or wonder where I have gone, I worked with delphi than assembler for windows since 1999 as an hobbyist. Than I came up with a decent idea than went to college to study Web Programming, etc. I got all four (A's) and class is over. Well, we never got to the good parts. LOL
although it does not display the page on screen, but works on it in memory –
This method, often called screen s*raping, uses the standard HTTP GET protocol: whenever you see /w/index.php?...=...&...=... in the browser address bar, everything after the question mark
All I see is I must study PERL. My question(s) is can I do this in ASM on a freeBSD machine running and updating my web site automatically at mid-night daily. For example, like gathering world-wide weather report or stock-market information that many news papers do hours before hitting the daily press.
I know it's about b*t, sp*ders and ro*ot, but nothing illegal for me but I never tried before and I need to know HOW and if I must use PERL, and if so WHY? If at all possible I rather learn how to do it in assembler for UNIX.
Thanks in advance
PS: It's a sad world when you take a break from ASM. I still can't see it but web programming has been fun but I prefer raw unix and not linux for this type of thing.
I see all web-development interesting because you must assemble bits from different threads to make your 'code' work with every browser.
With ASM you write and then DEBUG with disassembly. Rinse & repeat
In the web-world you write and then DEBUG in every browser
Sounds very promising project, if you start or are already getting somewhere, please don't hesitate to contact me. I have been dreaming about an A.I., but since I don't have much resources (time & money) at my hands, I can't afford to start a project this huge so the bot-thingy is somewhere in the middle
If you can do it in PERL then of course you can do it in ASM. There is no magic in PERL, it all comes down to machine code eventually.
I only been read about perl for a few days (the why and why not's) and no one say or even know about asm. I also know nothing about freeBSD. I only got freeBSD installed and learn how to write one or two sh scripts to back-up rc files. Next step is to learn how to back-up the whole OS on a flash stick. Next step is to make it smaller (mini-bsd). Next step is to learn how to USE IT. heehee Now you see why it took me many years to only learn basic asm. I am soooo slow and life did'nt allow me much spare time.
I have not install any programs yet cause I want to know how to walk the system first and that is very hard to get use to. It been sounding like perl is only a scripting language and do not comply into machine code. So I been hesitate to learn it. That's why I asking about it. Perl also need the wwwlib in-order to build a bot-thingy which make me believe it be hell to try in asm and that c would be the next runner up. I don't want to learn what I don't need. I am spoil. I usually follow suggestion by asm peoples first and they have always won out.
In the web-world you write and then DEBUG in every browser
I feel that i wasted two years of my life going to school. They force to use Windows products and Oracle for SQL which run on Windows and Linux. As for server its Windows Server.
but since I don't have much resources (time & money) at my hands, I can't afford
I want to learn Unix and MySQL. They are FREE but web programming you have to learn a lot more (PHP,JS,AJAX DOM etc). Time is the problem. I spend all my time getting tricked by all those dumb browser lost in their own c code. They threw in a monkey wrench against each other back-to-back while we suffer. MS is the worse, re-inventing the inch. I did not master cross-bowsing until a few days ago and that came from the help of this site out of thousands I visited. It was a bit*h. Ten time harder than ASM. IE-6 on one machine IE-7 on another, FF Opera, Safari and here comes Google Chrome . I tell you now ... let Fire Fox be the leader and make the other follow as you build. MS (IE) wasted up two years of my life, AGAIN, even in SCHOOL. I only like and need the raw OS and "I have never trust MS products (programs)".
The solution to true cross-browsing is HERE. NO more PX and % where possible.
For those who may wish to know, I better include that all of your boxes such as header, footer and container you should use percentage (%) and all of your floats and inner boxes should use (em) as with fonts also as indicated in the link.
It has worked for me and I am still experimenting to be 100% sure to the letter, forever. But this still is not the point of my post.
PERL is a scripting language, that means the script has to get interpreted by a program and then translated into a machine code, a load of cpu waste if you ask me. So if you want to stick to ASM, "CGI" is the keyword you 're looking for. Here is an example of CGI with an Win32 PE console application, taken from the APJ (Assembler Programming Journal #9) by Michael Pruitt:
include'\Asm_Win32\Include\_Kernel.inc' include'\Asm_Win32\Include\macro\stdcall.inc' include'\Asm_Win32\Include\macro\import.inc' Cr = 0x0D
Lf = 0x0A;***---------------------------------------------------------------***
Start: pusha;Save all of the Registers
stdcall [GetStdHandle], STD_OUTPUT_HANDLE;Retrive the actual handle
mov [StdOut], eax
cmpeax, INVALID_HANDLE_VALUE;Error with handle
Get_Time: stdcall [GetSystemTime], Time;Load SYSTEMTIME with UTC
callFormat_Time;Convert Hex(bin) to ascii
; and Place into HTML
Write: stdcall [WriteFile], [StdOut], HTML, HTML._size, HTML.Len, 0;Write the HTML to StdOut
Exit: popa;Restore all of the Registers
stdcall [ExitProcess], 0;***-------------------------[Subroutine]--------------------------***
Format_Time: movax, [Time.wYear] ;16b Data
movedi, HTML.Date_S + 9;Ptr to LAST byte of dest
call.ascii;Convert and place into HTML
movax, [Time.wDay] movedi, HTML.Date_S + 4
movax, [Time.wMonth] movedi, HTML.Date_S + 1
movedi, HTML.Day_S;Destination Ptr
movesi, Day.Wk;Source Ptr (Array of Days)
movax, [Time.wDayOfWeek] ;0 <= eax < 7
addesi, eax;esi =+ eax * 3
addesi, eax; Indexes the Array
movecx, 3;3B per Day String
cld;Copy Left to Right
rep; (esi++, edi++)
movax, [Time.wHour] cmpal, 13;Check for PM
subal, 12;Correct Hour
mov [HTML.Time_S + 9], 'P'; AM -> PM .wHour:
movedi, HTML.Time_S + 1
movax, [Time.wMinute] movedi, HTML.Time_S + 4
movax, [Time.wSecond] movedi, HTML.Time_S + 7
ret;***----------------------[Import Table / IAT]---------------------*** .ascii:
std;String OPs Right to Left
cmpax, 10;Single Digit?
andah, ah;Only Two Digits
movbh, 10;Reduce 3x16 to 2x16
divbh; so that AAM can be used
orah, 0x30;BCD -> ASCII
mov [edi], ah
decedi.twox16: aam; AH / 10 = AH r AL
oral, 0x30;BCD -> ASCII
jg.twox16.onex10: oral, 0x30
stosb;Copy Last/Only Digit to Mem
ret;***--------------------[Data used by this App]--------------------***
StdIndd0;Standard I/O Handles
HTML: db'Content-type: text/html', Cr, Lf, Cr, Lf
db'Hello World', Cr, Lf
db'<h1>Hello World</h1>', Cr, Lf
db'<h2>', Cr, Lf
db'This HTML is dynamicly generated by a PE console Application writen in' db'80x86 Assembler</h2>', Cr, Lf
db'<h2>It is: '.Day_Sdb'WkD '.Date_Sdb' 0/00/0000 '.Time_Sdb' 0:00:00 AM UTC</h2>', Cr, Lf
db'', Cr, Lf
HTML._size = $ - HTML - 1
HTML.Lendd0;Number of bytes actually wrote
Day.Wkdb'SunMonTueWedThuFriSat';***----------------------[Import Table / IAT]---------------------***
librarykernel, 'KERNEL32.DLL' kernel: importGetModuleHandle, 'GetModuleHandleA',\ GetCommandLine, 'GetCommandLineA',\ GetSystemTime, 'GetSystemTime',\ GetEnvVar, 'GetEnvironmentVariableA',\ GetStdHandle, 'GetStdHandle',\ CreateFile, 'CreateFileA',\ ReadFile, 'ReadFile',\ WriteFile, 'WriteFile',\ CloseHandle, 'CloseHandle',\ ExitProcess, 'ExitProcess'
Be aware that this is not FASM syntax!
Application development with ASM gives you much more freedom than using a scripting language; but with a scripting language you are faster but probably end up by programming senseless/unwanted stuff.
Learning ASM is a great benefit; almost everything can get programmed with it.
This is version for all platforms that have support for the ELF object format and the C library, like OpenBSD or Zeta. The object file provided in this package can be linked with the C library to create the final executable for any such system. The documentation in pure ASCII format is included.
No comment about freeBSD? OpenBSD is based on freeBSD I think. Do this mean It don't work on freeBSD and if it dose.. do we have to add out-side stuff to get it going? If so, what do I have to dig up, please? Cause I may drop down to 4-BSD for size and speed someday. I hope I don't have to jump ship but I will switch to OpenBSD in a spit-sec if freeBSD is too troublesome for FASM. I hope not. But I do need to know about this soon as possible if someone has experience.
Anyway, I scan a lot of stuff about perl last night and it is useful as far as some server work.
There is a thing that can turn a a complete perl script into a C code. Also there is a lot of C build into the perl interpreter itself and I got a feeling that FASM for UNIX darn near do the same thing. I know I am wrong about bot this but its my first thought so this is another question and not a statement.
Now I got a belly ache. And my brain it going poof.
Funny, at this very moment I see this as no big deal outside some serious web-programming work and using what I already know about ASM but must use unix syntax. I must dedicate my few month to BSD and ASM just to get comfortable and turn it into fun and use this bot-thingy as my first project and worry about the rest later.
Spi*ers, Ro*ots what the big deal when all I want to do it grab a simple web page... but differently.. (in SOURCE page form, text not HTML) downloaded to machine at a certain time of each night (A Timer). From there I don't need PERL other than some needed BSD scripting when needed ... I use an ASM program to search for changes in the file comparing it from yesterday source page and store the results somewhere. I can do that much in asm along but I don't know how to the get an HTML source code. Could some one drop a few examples in ASM for Windows. It don't have to work. I just need to see the idea of how it may be build using FASM than I can go from there. I think I done sold myself to take the complete dive and I am not going to chicken out. Black screen is boaring.
Thanks pete for the key-word CGI. That did it for me. I'm going down for count .. FASM on UNIX.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum