Commit 358d2792 authored by Lorenzo "Palinuro" Faletra's avatar Lorenzo "Palinuro" Faletra
Browse files

Import Upstream version 5.4

parent 097a64d1
......@@ -34,14 +34,15 @@ debug: amap.c
$(CC) $(OPT_DEBUG) -o amapcrap amapcrap.c $(XLIBS) $(XLIBPATHS) $(XIPATHS) $(XDEFINES)
install: all
@echo Installing to $(DESTDIR)$(PREFIX), change this by running ./configure --prefix=path
mkdir -vp $(DESTDIR)$(PREFIX)$(BINDIR) 2> /dev/null
mkdir -vp $(DESTDIR)$(PREFIX)$(DATADIR) 2> /dev/null
mkdir -vp $(DESTDIR)$(PREFIX)$(MANDIR) 2> /dev/null
test -e amap.exe || cp -fd amap amap6 amapcrap $(DESTDIR)$(PREFIX)$(BINDIR)
test -e amap.exe && cp -f amap.exe amapcrap.exe $(DESTDIR)$(PREFIX)$(BINDIR) || echo
cp -f $(SCRIPTS) $(DESTDIR)$(PREFIX)$(DATADIR)
cp -f $(MANPAGE) $(DESTDIR)$(PREFIX)$(MANDIR)
@echo Installing to $(PREFIX), change this by running ./configure --prefix=path
-mkdir -vp $(PREFIX)$(BINDIR) 2> /dev/null
-mkdir -vp $(PREFIX)$(DATADIR) 2> /dev/null
-mkdir -vp $(PREFIX)$(MANDIR) 2> /dev/null
-test -e amap.exe || cp -f amap amap6 amapcrap $(PREFIX)$(BINDIR)
-test -e amap.exe && cp -f amap.exe amapcrap.exe $(PREFIX)$(BINDIR) || echo
-cp -f $(SCRIPTS) $(PREFIX)$(DATADIR)
-cp -f $(MANPAGE) $(PREFIX)$(MANDIR)
-test $(PREFIX)$(BINDIR)/amap6 || cd $(PREFIX)$(BINDIR) && ln -s amap amap6
clean:
cd pcre-3.9 && make clean
......
......@@ -303,7 +303,10 @@ FILE *amap_open_file(char *fnam, char *type, char *extension, int verbose) {
strcat(file_name, AMAP_DEFAULT_FILENAME);
strcat(file_name, extension);
if ((f = fopen(file_name, "r")) == NULL) {
strcpy(file_name, "/etc/amap/");
strcpy(file_name, AMAP_PREFIX);
if (file_name[strlen(file_name) - 1] != '/')
strcat(file_name, "/");
strcat(file_name, "etc/");
strcat(file_name, AMAP_DEFAULT_FILENAME);
strcat(file_name, extension);
f = fopen(file_name, "r");
......@@ -2054,8 +2057,12 @@ int amap_main(amap_struct_options *opt, int argc, char *argv[]) {
// ONLINE UPDATE //
if (opt->update) {
printf("Running Online Update for fingerprints, connecting to %s\n", AMAP_RESOURCE);
if (opt->filename == NULL)
opt->filename = strdup("/etc/amap/" AMAP_DEFAULT_FILENAME);
if (opt->filename == NULL) {
opt->filename = malloc(strlen(AMAP_PREFIX) + 5 + strlen(AMAP_DEFAULT_FILENAME) + 2);
strcpy(opt->filename, AMAP_PREFIX);
strcat(opt->filename, "/etc/");
strcat(opt->filename, AMAP_DEFAULT_FILENAME);
}
opt->file_log = malloc(strlen(opt->filename) + 6);
strcpy(opt->file_log, opt->filename);
opt->file_nmap = malloc(strlen(AMAP_RESOURCE) + strlen(opt->file_log) + 16);
......
amap (5.4-4parrot1) rolling-testing; urgency=medium
[ dmknght ]
* Remove root requires permission
[ Nong Hoang Tu ]
* Init project for Parrot maintaning
* Remove Kali's gbp.conf
-- Nong Hoang Tu <dmknght@parrotsec.org> Mon, 18 Jan 2021 10:48:27 +0700
amap (5.4-4parrot0) rolling-testing; urgency=medium
* Upload to Parrot repository
-- Nong Hoang Tu <dmknght@parrotsec.org> Fri, 04 Dec 2020 14:07:49 +0700
amap (5.4-4kali2) kali-dev; urgency=medium
[ Raphaël Hertzog ]
* Update Vcs-* fields for the move to gitlab.com
* Add GitLab's CI configuration file
* Configure git-buildpackage for Kali
* Update URL in GitLab's CI configuration file
[ Kali Janitor ]
* Use secure copyright file specification URI.
* Use secure URI in Homepage field.
* Set debhelper-compat version in Build-Depends.
* Update standards version to 4.2.1, no changes needed.
-- Sophie Brun <sophie@offensive-security.com> Wed, 30 Sep 2020 09:56:38 +0200
amap (5.4-4kali1) kali-dev; urgency=medium
* Add kali marker to the version string.
* Cleanup the packaging.
-- Raphaël Hertzog <hertzog@debian.org> Mon, 27 Aug 2018 16:38:28 +0200
amap (5.4-4) kali; urgency=low
* Removed desktop file per new menu structure
-- Mati Aharoni <muts@kali.org> Thu, 13 Dec 2012 16:31:54 -0500
amap (5.4-3) kali; urgency=low
* Added desktop file
-- Mati Aharoni <muts@kali.org> Sat, 01 Dec 2012 10:16:26 -0500
amap (5.4-2) kali; urgency=low
* Upload with no changes to rebuild in kali/wheezy environment.
-- Raphaël Hertzog <hertzog@debian.org> Mon, 13 Aug 2012 22:20:44 +0200
amap (5.4-1) kali; urgency=low
* Initial release.
-- Raphaël Hertzog <hertzog@debian.org> Mon, 02 Apr 2012 13:34:23 +0000
Source: amap
Section: net
Priority: optional
Maintainer: Parrot Team <team@parrotsec.org>
Uploaders: Nong Hoang Tu <dmknght@parrotsec.org>
Build-Depends: debhelper-compat (= 12), libssl-dev, libpcre3-dev
Standards-Version: 4.5.0
Homepage: https://www.thc.org
Vcs-Git: https://nest.parrotsec.org/packages/tools/amap
Vcs-Browser: https://nest.parrotsec.org/packages/tools/amap
Package: amap
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: next-generation scanning tool for pentesters
AMAP stands for Application MAPper. It is a next-generation scanning
tool for pentesters. It attempts to identify applications even if they
are running on a different port than normal.
.
It also identifies non-ascii based applications. This is achieved by
sending trigger packets, and looking up the responses in a list of
response strings.
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: amap
Upstream-Contact: amap-dev@thc.org
Source: http://www.thc.org/thc-amap/
Disclaimer:
The license has multiple advertising clauses and forbids usages
for illegal activities.
Files: *
Copyright: 2003-2005 van Hauser and DJ RevMoon
License: GPL-2 + restrictions
1. This software comes with no warrenty or promised features. If it works
for you - fine. It just comes "AS-IS", which means as a bunch of bits and
bytes.
.
2. Anyone may use this software and pass it on to other persons or
companies as long as it is not charged for! (except for a small
transfer/medium fee)
.
3. This tool may *NOT* be used for illegal purpose. Please check the law
which affects your doing. I will have got no liability for any damage
etc. done with this tool legally or illegaly.
.
4. If this tool is used while providing a commercial service (e.g. as
part of a penetration test) the report has to state the tools name and
version, and additionally the authors (van Hauser and Dj RevMoon) and the
distribution homepage (http://www.thc.org).
.
5. If this tool is used within a commercial tool (being called out of
such a tool or being incorporated), the report generated has to state the
tools name and version, and additionally the authors (van Hauser and Dj
RevMoon) and the distribution homepage (http://www.thc.org). A tool is
"commercial" if it either costs money to purchase it, has a license fee,
and/or has costs for upgrades. Additionally, a commercial version or
license etc. must be made available to the author free of charge.
.
6. In all other respects the GPL 2.0 applies.
Files: pcre-3.9/*
Copyright: 1997-2001 University of Cambridge
License: GPL-2+
License: GPL-2+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
On Debian systems, the complete text of the GNU General Public License
version 2 can be found in /usr/share/common-licenses/GPL-2.
Files:
debian/helperscripts/*
debian/changelog
debian/rules
Copyright: 2020 Nong Hoang Tu <dmknght@parrotsec.org>
License: GPL-3+
[Desktop Entry]
Name=amap
Comment=Identify applications on running ports
Encoding=UTF-8
Exec=pentestexec "amap"
Icon=parrot-menu.png
StartupNotify=false
Terminal=true
Type=Application
Categories=01-info-gathering;01-04-network-scanners;
X-Parrot-Package=amap
Fix upstream build system to support the $DESTDIR variable
used by debhelper to install files in debian/amap/ instead
of in the root directory.
Catch failures and improve rules to not generate failures when
everything goes as expected.
--- a/Makefile.am
+++ b/Makefile.am
@@ -34,15 +34,14 @@ debug: amap.c
$(CC) $(OPT_DEBUG) -o amapcrap amapcrap.c $(XLIBS) $(XLIBPATHS) $(XIPATHS) $(XDEFINES)
install: all
- @echo Installing to $(PREFIX), change this by running ./configure --prefix=path
- -mkdir -vp $(PREFIX)$(BINDIR) 2> /dev/null
- -mkdir -vp $(PREFIX)$(DATADIR) 2> /dev/null
- -mkdir -vp $(PREFIX)$(MANDIR) 2> /dev/null
- -test -e amap.exe || cp -f amap amap6 amapcrap $(PREFIX)$(BINDIR)
- -test -e amap.exe && cp -f amap.exe amapcrap.exe $(PREFIX)$(BINDIR) || echo
- -cp -f $(SCRIPTS) $(PREFIX)$(DATADIR)
- -cp -f $(MANPAGE) $(PREFIX)$(MANDIR)
- -test $(PREFIX)$(BINDIR)/amap6 || cd $(PREFIX)$(BINDIR) && ln -s amap amap6
+ @echo Installing to $(DESTDIR)$(PREFIX), change this by running ./configure --prefix=path
+ mkdir -vp $(DESTDIR)$(PREFIX)$(BINDIR) 2> /dev/null
+ mkdir -vp $(DESTDIR)$(PREFIX)$(DATADIR) 2> /dev/null
+ mkdir -vp $(DESTDIR)$(PREFIX)$(MANDIR) 2> /dev/null
+ test -e amap.exe || cp -fd amap amap6 amapcrap $(DESTDIR)$(PREFIX)$(BINDIR)
+ test -e amap.exe && cp -f amap.exe amapcrap.exe $(DESTDIR)$(PREFIX)$(BINDIR) || echo
+ cp -f $(SCRIPTS) $(DESTDIR)$(PREFIX)$(DATADIR)
+ cp -f $(MANPAGE) $(DESTDIR)$(PREFIX)$(MANDIR)
clean:
cd pcre-3.9 && make clean
The Debian packaging moves the "etc" directory out of the AMAP_PREFIX
directory because /usr/etc/ is not a FHS-compliant directory.
Adapt the upstream source code to still find the files in their new place.
--- a/amap-lib.c
+++ b/amap-lib.c
@@ -303,10 +303,7 @@ FILE *amap_open_file(char *fnam, char *t
strcat(file_name, AMAP_DEFAULT_FILENAME);
strcat(file_name, extension);
if ((f = fopen(file_name, "r")) == NULL) {
- strcpy(file_name, AMAP_PREFIX);
- if (file_name[strlen(file_name) - 1] != '/')
- strcat(file_name, "/");
- strcat(file_name, "etc/");
+ strcpy(file_name, "/etc/amap/");
strcat(file_name, AMAP_DEFAULT_FILENAME);
strcat(file_name, extension);
f = fopen(file_name, "r");
@@ -2057,12 +2054,8 @@ int amap_main(amap_struct_options *opt,
// ONLINE UPDATE //
if (opt->update) {
printf("Running Online Update for fingerprints, connecting to %s\n", AMAP_RESOURCE);
- if (opt->filename == NULL) {
- opt->filename = malloc(strlen(AMAP_PREFIX) + 5 + strlen(AMAP_DEFAULT_FILENAME) + 2);
- strcpy(opt->filename, AMAP_PREFIX);
- strcat(opt->filename, "/etc/");
- strcat(opt->filename, AMAP_DEFAULT_FILENAME);
- }
+ if (opt->filename == NULL)
+ opt->filename = strdup("/etc/amap/" AMAP_DEFAULT_FILENAME);
opt->file_log = malloc(strlen(opt->filename) + 6);
strcpy(opt->file_log, opt->filename);
opt->file_nmap = malloc(strlen(AMAP_RESOURCE) + strlen(opt->file_log) + 16);
add-destdir-support
fix-appdef-lookup-dir
#!/usr/bin/make -f
%:
dh $@ --no-parallel
override_dh_auto_configure:
./configure --prefix=/usr
override_dh_auto_install:
dh_auto_install
mkdir -p debian/amap/usr/share debian/amap/etc
mkdir -p debian/amap/usr/share/applications/
mv debian/amap/usr/man debian/amap/usr/share/
mv debian/amap/usr/etc debian/amap/etc/amap
cp debian/helperscripts/parrot-amap.desktop debian/amap/usr/share/applications/
# There's no website anymore.
#
#version=3
#http://www.thc.org/thc-amap/ .*/amap-(.*)\.tar\.gz
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment