OXIESEC PANEL
- Current Dir:
/
/
usr
/
share
/
doc
/
gawk
/
examples
/
network
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
10/21/2019 03:49:14 PM
rwxr-xr-x
📄
PostAgent.sh
274 bytes
08/25/2016 03:14:42 AM
rw-r--r--
📄
coreserv.awk
3.31 KB
08/25/2016 03:14:42 AM
rw-r--r--
📄
eliza.awk
9.98 KB
08/25/2016 03:14:42 AM
rw-r--r--
📄
fingerclient.awk
161 bytes
08/25/2016 03:14:42 AM
rw-r--r--
📄
geturl.awk
787 bytes
08/25/2016 03:14:42 AM
rw-r--r--
📄
hello-serv.awk
463 bytes
08/25/2016 03:14:42 AM
rw-r--r--
📄
maze.awk
2.59 KB
08/25/2016 03:14:42 AM
rw-r--r--
📄
mobag.awk
2.77 KB
08/25/2016 03:14:42 AM
rw-r--r--
📄
panic.awk
575 bytes
08/25/2016 03:14:42 AM
rw-r--r--
📄
protbase.awk
400 bytes
08/25/2016 03:14:42 AM
rw-r--r--
📄
protbase.request
162 bytes
08/25/2016 03:14:42 AM
rw-r--r--
📄
protbase.result
642 bytes
08/25/2016 03:14:42 AM
rw-r--r--
📄
remconf.awk
2.13 KB
08/25/2016 03:14:42 AM
rw-r--r--
📄
statist.awk
3.53 KB
08/25/2016 03:14:42 AM
rw-r--r--
📄
stoxdata.txt
165 bytes
08/25/2016 03:14:42 AM
rw-r--r--
📄
stoxpred.awk
4.66 KB
08/25/2016 03:14:42 AM
rw-r--r--
📄
testserv.awk
334 bytes
08/25/2016 03:14:42 AM
rw-r--r--
📄
urlchk.awk
1.03 KB
08/25/2016 03:14:42 AM
rw-r--r--
📄
webgrab.awk
185 bytes
08/25/2016 03:14:42 AM
rw-r--r--
Editing: mobag.awk
Close
BEGIN { if (ARGC != 2) { print "MOBAG - a simple mobile agent" print "CALL:\n gawk -f mobag.awk mobag.awk" print "IN:\n the name of this script as a command-line parameter" print "PARAM:\n -v MyOrigin=myhost.com" print "OUT:\n the result on stdout" print "JK 29.03.1998 01.04.1998" exit } if (MyOrigin == "") { "uname -n" | getline MyOrigin close("uname -n") } } #ReadMySelf /^function / { FUNC = $2 } /^END/ || /^#ReadMySelf/ { FUNC = $1 } FUNC != "" { MOBFUN[FUNC] = MOBFUN[FUNC] RS $0 } (FUNC != "") && (/^}/ || /^#EndOfMySelf/) \ { FUNC = "" } #EndOfMySelf function migrate(Destination, MobCode, Label) { MOBVAR["Label"] = Label MOBVAR["Destination"] = Destination RS = ORS = "\r\n" HttpService = "/inet/tcp/0/" Destination for (i in MOBFUN) MobCode = (MobCode "\n" MOBFUN[i]) MobCode = MobCode "\n\nBEGIN {" for (i in MOBVAR) MobCode = (MobCode "\n MOBVAR[\"" i "\"] = \"" MOBVAR[i] "\"") MobCode = MobCode "\n}\n" print "POST /cgi-bin/PostAgent.sh HTTP/1.0" |& HttpService print "Content-length:", length(MobCode) ORS |& HttpService printf "%s", MobCode |& HttpService while ((HttpService |& getline) > 0) print $0 close(HttpService) } END { if (ARGC != 2) exit # stop when called with wrong parameters if (MyOrigin != "") # is this the originating host? MyInit() # if so, initialize the application else # we are on a host with migrated data MyJob() # so we do our job } function MyInit() { MOBVAR["MyOrigin"] = MyOrigin MOBVAR["Machines"] = "localhost/80 max/80 moritz/80 castor/80" split(MOBVAR["Machines"], Machines) # which host is the first? migrate(Machines[1], "", "") # go to the first host while (("/inet/tcp/8080/0/0" |& getline) > 0) # wait for result print $0 # print result close("/inet/tcp/8080/0/0") } function MyJob() { # forget this host sub(MOBVAR["Destination"], "", MOBVAR["Machines"]) MOBVAR["Result"]=MOBVAR["Result"] SUBSEP SUBSEP MOBVAR["Destination"] ":" while (("who" | getline) > 0) # who is logged in? MOBVAR["Result"] = MOBVAR["Result"] SUBSEP $0 close("who") if (index(MOBVAR["Machines"], "/") > 0) { # any more machines to visit? split(MOBVAR["Machines"], Machines) # which host is next? migrate(Machines[1], "", "") # go there } else { # no more machines gsub(SUBSEP, "\n", MOBVAR["Result"]) # send result to origin print MOBVAR["Result"] |& "/inet/tcp/0/" MOBVAR["MyOrigin"] "/8080" close("/inet/tcp/0/" MOBVAR["MyOrigin"] "/8080") } }