Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This .gitattributes file is autogenerated with ZIGI v3r02
* git-encoding=iso8859-1 zos-working-tree-encoding=ibm-1047
.gitattributes git-encoding=iso8859-1 zos-working-tree-encoding=iso8859-1
.gitignore git-encoding=IBM-1047 zos-working-tree-encoding=IBM-1047
Empty file added .zigi/ACCESS
Empty file.
Empty file added .zigi/APFCHECK
Empty file.
2 changes: 2 additions & 0 deletions .zigi/ASM
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ACCESS 20/10/09 20/10/09 1 0 06:14:14 97 97 0 ENUM
APFCHECK 20/10/09 20/10/09 1 0 06:14:14 218 218 0 ENUM
1 change: 1 addition & 0 deletions .zigi/C
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHECKUP 20/10/09 20/10/09 1 0 06:14:16 96 96 0 ENUM
Empty file added .zigi/ENUM
Empty file.
6 changes: 6 additions & 0 deletions .zigi/EXEC
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CATMAP 20/10/09 20/10/09 1 0 06:14:19 498 498 0 ENUM
ENUM 20/10/09 20/10/09 1 0 06:14:19 1053 1053 0 ENUM
PSSF 20/10/09 20/10/09 1 0 06:14:19 1320 1320 0 ENUM
SEARCHRX 20/10/09 20/10/09 1 0 06:14:19 24 24 0 ENUM
STARTMAP 20/10/09 20/10/09 1 0 06:14:19 396 396 0 ENUM
SYS0WN 20/10/09 20/10/09 1 1 06:24:10 171 161 0 ENUM
Empty file added .zigi/LICENSE
Empty file.
Empty file added .zigi/PSSF
Empty file.
Empty file added .zigi/README.MD
Empty file.
Empty file added .zigi/SEARCHRX.REXX
Empty file.
Empty file added .zigi/SYS0WN
Empty file.
26 changes: 26 additions & 0 deletions .zigi/dsn
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# ZIGI dsn-file
# This file needs to be here.
# Don't edit unless you know what you're doing :)
#
# record format is (case insensitive):
#
# Position - description
#
# 1 - directory name which will be prefixed by the
# defined HLQ to create the z/OS dataset
# (* defines the default)
# 2 - PS or PO (dataset organization)
# PS for a flat file
# PO for a directory and thus a partitioned dataset
# 3 - record format (FB or VB)
# 4 - lrecl
# 5 - blksize
# 0 is allowed if system determined blksize is enabled
# 6 - extension (optional - if used then no period)
# file extension to be used for PDS members in USS
#
# Default DSORG and DCB info
* PO FB 80 32720
ASM PO FB 80 32720
C PO VB 255 32720
EXEC PO FB 80 27920
File renamed without changes.
File renamed without changes.
30 changes: 15 additions & 15 deletions checkp.c → C/CHECKUP
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,33 @@
To use in TSO (after compile in Unix):
/bin/tsocmd "ALLOCATE DATASET(PDSE) NEW VOLUME(DEV) SPACE(10,10) BLOCK(200) BLKSIZE(6144) RECFM(U) LRECL(0) DSNTYPE(LIBRARY) DSORG(PO)"
cp -X ./checkp "//'<HLQ>.PDSE(CHECKP)'"

in TSO: call '<HLQ>.PDSE(CHECKP)' '<port>/-a'

License GPL
Copyright Soldier of FORTRAN

Purpose: If you don't have access to netstat
this will print a list of potential open ports
or checks on a single port.
The output is comma sperated to be copied to Nmap.

*/

#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <stdio.h>

int checkp(int);
int checkp(int port)
{
/* Checks if a port is available for use */
struct sockaddr_in server; /* server address information */
int s; /* socket for accepting connections */
int result = 0; /* 1 open 0 closed */
if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0)
if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0)
{
printf("[!] ERROR Cannot open a socket! Are you sure you have permission?");
exit(2);
Expand All @@ -40,18 +40,18 @@ int checkp(int port)
if (bind(s, (struct sockaddr *)&server, sizeof(server)) < 0)
{
result = 1;
}
}
close(s);
return result;
}

main(argc, argv)
int argc;
char **argv;
{
unsigned short port; /* port server binds to */
int results; /* We got em */
int i; /* for loop */
int i; /* for loop */
char* logo = "\n"
" _______ __ __ _______ \n"
"| _ | |--.-----.----| |--. | _ |\n"
Expand All @@ -60,16 +60,16 @@ char **argv;
"|: 1 | |: | \n"
"|::.. . | |::.| \n"
"`-------' `---' \n\n";
printf("%s", logo);

printf("%s", logo);
if (argc != 2)
{
fprintf(stderr, "Usage:\n Check one port: %s <port>\n Check all ports: %s -a\n\n", argv[0], argv[0]);
exit(1);
}

/* First check the arguments */

if (0 == strcmp(argv[1], "-a")) {
printf("*** You're in the butter zone now baby!\n");
printf("*** Checking ports 1 through 65535\n");
Expand All @@ -90,7 +90,7 @@ char **argv;
printf("*** %d is not in use\n", port);
}
}

printf("*** Done\n\n");
exit(0);
}
File renamed without changes.
Loading